|
-
Apr 24th, 2007, 01:16 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] asp, vbs, db AAARRRGGGHHHH
I'm having a hard time setting up my first ASP/VBS/DB script and need some help.
I've setup a Win98 virtual PC with PWS and IE6, gone into Control Panel/32bit ODBC/System DNS and set the path the the DB I'm using, installed Jet 4-SP8 for Win9X and installed MDAC 2.8 SP1.
Here's the code I'm fighting with now.
vb Code:
Set DB = Server.CreateObject("ADODB.Connection")
DB.Open ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & "C:\Inetpub\iissamples\Rowen\xyz\RS.mdb")
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open "SELECT * FROM tblCustomer WHERE Email = " & Request.Form ("EmailAddress"), DB
If RS.EOF And RS.BOF Then
RS.AddNew
RS("Email") = Request.Form ("EmailAddress")
End If
I'm getting the error "The operation requested by the application is not supported by the provider." in the RS.AddNew line.
I tried changing the connection like this:
vb Code:
RS.Open "SELECT * FROM tblCustomer WHERE Email = " & Request.Form("EmailAddress"), DB, adOpenStatic, adLockOptimistic
but then I get the error, 'Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.'
So I tried replaceing adOpenStatic and adLockOptimistic with 3 and 2, respectively, but now I get:
'Syntax error (missing operator) in query expression 'Email = [email protected]'. '
SO, what the heck does this thing want?!?!?!?!?
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
|