[thelist] Select QRY problem

Ken Schaefer Ken at adOpenStatic.com
Mon Mar 14 19:48:28 CST 2005


You do not need to "convert" it to anything.

In ASP, all you are doing is building a string. The string just happens to
contain an SQL statement. The database engine parses the string to work out
what it needs to do. The DBMS determines types by looking at delimiters, and
by various other rules (e.g. rules it has about comparisons, field types
etc). Anything you do up in your ASP layer (e.g. CInt()) has no impact on the
SQL statement you are building, since that's just a string.

Cheers
Ken

: -----Original Message-----
: From: thelist-bounces at lists.evolt.org [mailto:thelist-
: bounces at lists.evolt.org] On Behalf Of Pringle, Ron
: Sent: Tuesday, 15 March 2005 5:19 AM
: To: 'thelist at lists.evolt.org'
: Subject: RE: [thelist] Select QRY problem
: 
: Peter et al-
: 
: Thanks for the tips, it ended up being the simple fact that I hadn't
: converted my querystring into an integer, so of course it wasn't matching,
: and of course it wasn't selecting any records.
: 
: Der.
: 
: However, I would have thought it would have thrown a type mismatch error.
: Live and learn!
: 
: Ron
: 
: 
: 
: >    When this happens, the first thing to do is to
: > response.write the SQL statement so you can see what it's
: > really saying to the DB.  Chances are you have an empty
: > "detailsID" parameter.
: >
: > From: "Pringle, Ron" RPringle at aurora-il.org
: >
: > I'm using VBScript and Access 2000.
: >
: > I'm trying to select a specific record from my DB and am getting the
: > following error:
: >
: > Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
: > [Microsoft][ODBC Microsoft Access Driver] Too few parameters.
: > Expected 1.



More information about the thelist mailing list