|
-
Apr 18th, 2001, 02:46 AM
#1
Thread Starter
Hyperactive Member
When i use this SQL string I get 2 records returned:
SELECT PlaatsID, Name FROM Loc WHERE PlaatsID Like 'E_%';
When i use this SQL string i get nothing:
SELECT PlaatsID, Name FROM Loc WHERE PlaatsID Like 'E_*';
I don't get it...
I use this to do the databse communication:
Set objConn = server.CreateObject("ADODB.Connection")
Set objRS = server.CreateObject("ADODB.Recordset")
strSQL = "SELECT PlaatsID, BladzijdeID FROM Bladzijden WHERE PlaatsID Like 'E_%'"
objConn.Open strConnect
objRS.Open strSQL,objConn,3,1,1
-
Apr 18th, 2001, 03:10 AM
#2
Fanatic Member
The wild card in your 'WHERE' clause of the statement needs to be '*' for Access databases, and '%' for SQL Server databases.
You could use a consatant in your SQL statement to represent the wildcard, so that if you connect to a different database, then you only need to change it once.
-
Apr 18th, 2001, 04:36 AM
#3
Thread Starter
Hyperactive Member
I was under the impression that "%" was a wildcard for 1 character and that "*" was a wildcard for x characters
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
|