|
 |
asp_databases thread: RE: SQL Probs... =(
Message #1 by "Drew, Ron" <RDrew@B...> on Tue, 14 May 2002 17:53:12 -0400
|
|
Is id a numeric value?
SQL =3D "SELECT * FROM Friends WHERE userid =3D '" & userid & "' AND
friend
=3D " & id & ";"
-----Original Message-----
From: SD-Studios [mailto:info@s...]
Sent: Tuesday, May 14, 2002 3:20 PM
To: ASP Databases
Subject: [asp_databases] SQL Probs... =3D(
Im using this SQL-string trying to do a usual select..:
userid =3D Session("id")
id =3D Request.Form("user")
SQL =3D "SELECT * FROM Friends WHERE userid =3D '" & userid & "' AND
friend
=3D '" & id & "'"
But it gives me this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria
expression.
/cdos/develop2/a_profile.asp, line 159
Please help me out ASAP.. Tnx! =3D)
--
MVH, Martin Johansson
CEO & Project Supervisor
SD-Studios
+46 (0)70-3003320
http://www.sd-studios.com
Message #2 by "Peter Foti (PeterF)" <PeterF@S...> on Tue, 14 May 2002 15:27:43 -0400
|
|
If your userid field or friend field store numbers instead of
characters, don't surround the value with single quotes.
Regards,
Peter
> -----Original Message-----
> From: SD-Studios [mailto:info@s...]
> Sent: Tuesday, May 14, 2002 3:20 PM
> To: ASP Databases
> Subject: [asp_databases] SQL Probs... =(
>
>
> Im using this SQL-string trying to do a usual select..:
> userid = Session("id")
> id = Request.Form("user")
> SQL = "SELECT * FROM Friends WHERE userid = '" & userid & "'
> AND friend = '"
> & id & "'"
>
> But it gives me this error:
> Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
>
> [Microsoft][ODBC Microsoft Access Driver] Data type mismatch
> in criteria
> expression.
>
> /cdos/develop2/a_profile.asp, line 159
>
>
> Please help me out ASAP.. Tnx! =)
> --
> MVH, Martin Johansson
> CEO & Project Supervisor
> SD-Studios
> +46 (0)70-3003320
> http://www.sd-studios.com
>
>
>
Message #3 by "SD-Studios" <info@s...> on Tue, 14 May 2002 21:19:47 +0200
|
|
Im using this SQL-string trying to do a usual select..:
userid = Session("id")
id = Request.Form("user")
SQL = "SELECT * FROM Friends WHERE userid = '" & userid & "' AND friend = '"
& id & "'"
But it gives me this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria
expression.
/cdos/develop2/a_profile.asp, line 159
Please help me out ASAP.. Tnx! =)
--
MVH, Martin Johansson
CEO & Project Supervisor
SD-Studios
+46 (0)70-3003320
http://www.sd-studios.com
|
|
 |