-
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
-
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.
-
I was under the impression that "%" was a wildcard for 1 character and that "*" was a wildcard for x characters