Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SELECT - syntax (missing operator) erro

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-01-09 : 10:06:13
Kelley writes "my form page is
www.busterboo.com/pswdrecovery.asp

my asp mail page using CDONTS is
www.busterboo.com/sendmail.asp

I have tried everything and cannot get this to work. Please HELP!! I believe the problem is with my SELECT string (see below)

Kelley
kpweld@hotmail.com

Dim rsrecovery__strTo
rsrecovery__strTo = Request("email")

'Create a recordset
set rsrecovery = Server.CreateObject("ADODB.Recordset")
rsrecovery.ActiveConnection = MM_members_STRING
rsrecovery.Source = "SELECT uname, pswd1, fname, lname FROM Table1 WHERE email = " & rsrecovery__strTo

rsrecovery.CursorType = 0
rsrecovery.CursorLocation = 2
rsrecovery.LockType = 3
rsrecovery.Open()
rsrecovery_numRows = 0"

Nazim
A custom title

1408 Posts

Posted - 2002-01-09 : 10:21:27


rsrecovery.Source = "SELECT uname, pswd1, fname, lname FROM Table1 WHERE email = '" & rsrecovery__strTo & "'"


hth

----------------------------
Anything that Doesn't Kills you Makes you Stronger
Go to Top of Page

lfmn
Posting Yak Master

141 Posts

Posted - 2002-01-09 : 10:54:23
in the future, if you think the problem is on the sql side, you can just do a response.write of the sql string and paste it into query analyzer.

dim sql
sql = "SELECT uname, pswd1, fname, lname FROM Table1 WHERE email = " & rsrecovery__strTo

response.write sql
response.end

rsrecovery.Source = sql


quote:

Kelley writes "my form page is
www.busterboo.com/pswdrecovery.asp

my asp mail page using CDONTS is
www.busterboo.com/sendmail.asp

I have tried everything and cannot get this to work. Please HELP!! I believe the problem is with my SELECT string (see below)

Kelley
kpweld@hotmail.com

Dim rsrecovery__strTo
rsrecovery__strTo = Request("email")

'Create a recordset
set rsrecovery = Server.CreateObject("ADODB.Recordset")
rsrecovery.ActiveConnection = MM_members_STRING
rsrecovery.Source = "SELECT uname, pswd1, fname, lname FROM Table1 WHERE email = " & rsrecovery__strTo

rsrecovery.CursorType = 0
rsrecovery.CursorLocation = 2
rsrecovery.LockType = 3
rsrecovery.Open()
rsrecovery_numRows = 0"



cursors are like hammers - sometimes you have to use them, but watch your thumb!
Go to Top of Page
   

- Advertisement -