hypz Posted June 12, 2012 at 11:23 AM Report #462144 Posted June 12, 2012 at 11:23 AM Dim sql1 As String = "Select from Valor_Total from Historico where Data_Carregamento='" & 2012 - 6 - 11 & "'" Gostava de saber se esta query está correcta 😉
Caça Posted June 12, 2012 at 11:26 AM Report #462145 Posted June 12, 2012 at 11:26 AM Não, tens dois froms e a data deve ir sem espaços Select from Valor_Total from Historico Pedro Martins Não respondo a duvidas por PM
hypz Posted June 12, 2012 at 11:28 AM Author Report #462146 Posted June 12, 2012 at 11:28 AM (edited) Dim sql1 As String = "Select Valor_Total from Historico where Data_Carregamento='" & 2012 - 6 - 11 & "'" isto ? E o vb poe os espaços automaticamente. Edited June 12, 2012 at 11:29 AM by hypz
Caça Posted June 12, 2012 at 12:41 PM Report #462170 Posted June 12, 2012 at 12:41 PM Ainda não, ao fazeres isto 2012 - 6 - 11 o que ele vai fazer é subtrair números, a data deve ir dentro da string. Pedro Martins Não respondo a duvidas por PM
hypz Posted June 12, 2012 at 01:54 PM Author Report #462200 Posted June 12, 2012 at 01:54 PM Dim sql1 As String = "Select Valor_Total from Historico where Data_Carregamento = '2012-06-11'" Assim ? o:
Caça Posted June 12, 2012 at 01:59 PM Report #462203 Posted June 12, 2012 at 01:59 PM Sim. Pedro Martins Não respondo a duvidas por PM
hypz Posted June 12, 2012 at 02:04 PM Author Report #462206 Posted June 12, 2012 at 02:04 PM Dá-me este erro, "Tipo de dados incorrecto na expressão de critérios." no OleDbException was unhandled"
Caça Posted June 12, 2012 at 02:24 PM Report #462215 Posted June 12, 2012 at 02:24 PM Executa essa query no Access. Pedro Martins Não respondo a duvidas por PM
hypz Posted June 12, 2012 at 02:33 PM Author Report #462222 Posted June 12, 2012 at 02:33 PM Obrigado já resolvi o problema. 🙂
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now