hypz Posted June 12, 2012 at 11:23 AM Report Share #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 😉 Link to comment Share on other sites More sharing options...
Caça Posted June 12, 2012 at 11:26 AM Report Share #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 Link to comment Share on other sites More sharing options...
hypz Posted June 12, 2012 at 11:28 AM Author Report Share #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 Link to comment Share on other sites More sharing options...
Caça Posted June 12, 2012 at 12:41 PM Report Share #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 Link to comment Share on other sites More sharing options...
hypz Posted June 12, 2012 at 01:54 PM Author Report Share #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: Link to comment Share on other sites More sharing options...
Caça Posted June 12, 2012 at 01:59 PM Report Share #462203 Posted June 12, 2012 at 01:59 PM Sim. Pedro Martins Não respondo a duvidas por PM Link to comment Share on other sites More sharing options...
hypz Posted June 12, 2012 at 02:04 PM Author Report Share #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" Link to comment Share on other sites More sharing options...
Caça Posted June 12, 2012 at 02:24 PM Report Share #462215 Posted June 12, 2012 at 02:24 PM Executa essa query no Access. Pedro Martins Não respondo a duvidas por PM Link to comment Share on other sites More sharing options...
hypz Posted June 12, 2012 at 02:33 PM Author Report Share #462222 Posted June 12, 2012 at 02:33 PM Obrigado já resolvi o problema. 🙂 Link to comment Share on other sites More sharing options...
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