esquima Posted October 26, 2007 at 06:59 PM Report Share #143083 Posted October 26, 2007 at 06:59 PM Boas..tenho uma bd em acess, na parte da programaçao em vb como e que recebo um valor que ta guardado numa variavel string eu faço "SELECT * FROM contacos WHERE nome ="&cellvalue so que o sql nao assume :S se eu meter ...WHERE nome = 'joao' ja me apanha alguem me pode ajudar Link to comment Share on other sites More sharing options...
Betovsky Posted October 26, 2007 at 07:10 PM Report Share #143093 Posted October 26, 2007 at 07:10 PM Se reparaste puseste joao no meio de plicas ('), e na primeira query de sql não estás a por as plicas... "Give a man a fish and he will eat for a day; Teach a man to fish and he will eat for a lifetime. The moral? READ THE MANUAL !" Sign on a computer system consultant's desk Link to comment Share on other sites More sharing options...
esquima Posted October 26, 2007 at 07:19 PM Author Report Share #143101 Posted October 26, 2007 at 07:19 PM euj ma meti assim ...Where nome='"&cellvalue mas continua a nao dar...dame um erro de object referenc not set to an instance object tb ja mudei para cellvalue.string e nada Link to comment Share on other sites More sharing options...
Betovsky Posted October 26, 2007 at 07:33 PM Report Share #143107 Posted October 26, 2007 at 07:33 PM Está a por a plica inicial, mas e a plica final? A que vem depois do joao. Como tens a query irá dar qualquer coisa como: SELECT * FROM contacos WHERE nome ='joao Estás a ver o problema? "Give a man a fish and he will eat for a day; Teach a man to fish and he will eat for a lifetime. The moral? READ THE MANUAL !" Sign on a computer system consultant's desk Link to comment Share on other sites More sharing options...
esquima Posted October 26, 2007 at 07:46 PM Author Report Share #143112 Posted October 26, 2007 at 07:46 PM tb ja metei..where nome = ' ' " &cellvalue e nada... nao tou mesmo a ver Link to comment Share on other sites More sharing options...
Betovsky Posted October 26, 2007 at 07:55 PM Report Share #143114 Posted October 26, 2007 at 07:55 PM Tipo tens de por: where nome = '" & cellvalue & "'" "Give a man a fish and he will eat for a day; Teach a man to fish and he will eat for a lifetime. The moral? READ THE MANUAL !" Sign on a computer system consultant's desk Link to comment Share on other sites More sharing options...
esquima Posted October 26, 2007 at 08:15 PM Author Report Share #143128 Posted October 26, 2007 at 08:15 PM obrigado...uma coisa simples e andava para aqui a atrofiar com isto ?..... ja deu 😉 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