|
-
Feb 1st, 2004, 02:44 PM
#1
Thread Starter
Registered User
select query quick question...
myString = MyDataTable.Select("SELECT * FROM TableName WHERE ColoumnName = " & "myValueToFind")
i tried this on some different tables and i always get syntax error: missing operand after TableName operator ?
this is a pretty standard query, so i have no idea where the mistake could be...
any ideas?
-
Feb 1st, 2004, 03:30 PM
#2
Frenzied Member
"SELECT * FROM TableName WHERE ColumnName = " & SomeValue & """
SomeValue wouldn't normally be in quotes. Depending on the db, and the datatype of SomeValue, you may have to enclose it in some other symbols. In Access, for example, strings are enclosed in single quotes, dates in the pound symbol, etc. And if SomeValue is a variable of one type but the type of ColumnName is a different one, you may have to convert it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|