Current location: Hot Scripts Forums » Programming Languages » ASP » PLEASE HELP! New to programming and getting an error :(

PLEASE HELP! New to programming and getting an error :(

 
Prev Previous Post   Next Post Next
  #1  
Old 03-24-09, 11:11 AM
MSJRunner MSJRunner is offline
New Member
 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
PLEASE HELP! New to programming and getting an error :(

Hi all, I'm brand new to this forum, and I'm trying to do homework for my ASP class. We're using ASP VB script and I'm trying to make the most basic Master/Detail Add/Edit/Delete page. This is the error I am getting...

Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression 'BID='.

/users/hessel/pub/ASP/Midterm/BooksEditProc.asp, line 15

Here is my code:
Code:
<%
 
set Conn=server.createobject("ADODB.Connection")
connString="Data Source=" & Server.Mappath("Books.mdb") & ";Provider=Microsoft.Jet.OLEDB.4.0;"
Conn.Open connString
 
Dim sql, rs
'Set up connection to the DSN, which will talk to the database
 
sql="select * from Books1 where BID=" & request.form("BID")
set rs=server.createobject("adodb.recordset")
rs.cursortype=3
rs.locktype=3
rs.Open sql, Conn
rs("Name")=request.form("Name")
rs("Author")=request.form("Author")
rs("Publisher")=request.form("Publisher")
rs("YearOfPublication")=request.form("YearOfPublic ation")
rs("Color")=request.form("Color")
rs("Genre")=request.form("Genre") 
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.redirect("booksmaster_2.asp")
%>
Could someone PLEASE help me, I'm sure it's so simple, but I have no idea what's wrong with my code. Thank you so much.

Last edited by digioz; 03-25-09 at 10:23 AM. Reason: Please use code tags.
Reply With Quote
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:10 AM.
vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2 (Unregistered)