Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
vb6 and sql language
Name: VBIDIOT Date: September 18, 2002 at 11:12:39 Pacific OS: 98 CPU/Ram: 350/196
Comment:
I have a sql query that limits records displayed on a form and it works great. it looks something like this dim inp as string inp=InputBox("ENTER NAME") data1.recordsource = "select store.date, store.name form store where name="& inp I have added another input variable and now it won't work. I'm sure it is in the sql statement. this is what I have now... Dim inp as string dim inp2 as string inp=Inputbox("ENTER NAME") inp2=InputBox("ENTER DATE") Data1.recordsource = "Select store.name, store.date where name =" & inp AND date =" & inp2. this just doesn't seem to work.???
Name: madman Date: September 18, 2002 at 16:33:23 Pacific
Reply:
It need to look this this.."Select store.name, store.date Where name = " & inp & " And date = #" & inp2 & "#". The whole statement must be a string when complete.
0
Response Number 2
Name: Steel Date: September 19, 2002 at 00:05:59 Pacific
Reply:
The problem is, that you don't use the Hexens. This gives a problem with dates. Further if you want to execute a query like this you have to be certain that the date you send is in english format mm-dd-yyyy. Use the following statement:
"Select store.name, store.date Where name = '" & inp & "' And date = #" & format(inp2, "mm-dd-yyyy") & "#". And it will always work.
Summary: Hi, I have a problem, I am using VB6 to get around 30 fields and there values in a loop and then copying them. Everything works fine and it copies 20 out of the 50 lines that i want it to, after doing...
Summary: Several ways to do this... one way is: You could just connect to the DB using VB6 and write a "select *" SQL query to your database, extract the filenames into an array or collection. Then create the...
Summary: The VB6 SQL string that I am using is correct. I have tested it in Visual Data Manager where it is possible to quickly test'execute a SQL query. I'm not saying you screwed the query up, I'm implying t...