Author |
Topic |
|
Spoon
Average Member
Ireland
507 Posts |
Posted - 12 July 2001 : 12:34:56
|
Hi,
At this stage ive gone mad, ive tried everything!!!
The script gathers the fields TEXT and LINK from the form, Then when it goes to add it to the ACCESS 2000 DB it messes up, here is my sql stmt
sqlstmt = "INSERT INTO Bottomlinks (TEXT,LINK) VALUES ('"&TEXT&"','"&LINK&"')"
BOTDB.Execute(sqlstmt)
I dont know whats up with it at all. Heres the error i get
-------
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
/admin/bodytags/botl.asp, line 205
-----
Maybe its something easy, i just cant figure it out or spot whats wrong. Ive got a feeling its something to do with the LINK string. I trim the Link string and see if it contains the text "http://" . If it does, it continues, heres the code for that bit just incase
-----------------
LINK = Request.Form("LINK") If LINK = "" Then Response.Write "<font face=verdana size=2 color=red><b><center>" Response.Write "You must enter a LINK value</b>" Response.Write "<br><font size=1 color=blue><a href='Javascript: OnClick= history.back()'>Go Back</a>" Response.Write "</font></center></font>" Response.End End If
LINKSTRING = Lcase(LINK) LINK = InStr(LINKSTRING,"http://") If LINK = 0 Then Response.Write "<font face=verdana size=2 color=red><b><center>" Response.Write LINKSTRING & "</b> is not a valid URL. Remember you must use the <b>http://</b> Path." Response.Write "<br><font size=1 color=blue><a href='Javascript: OnClick= history.back()'>Go Back</a>" Response.Write "</font></center></font>" Response.End End If
---------------
Thanks to anyone who helps me
Sunil Kumar
"uohh look at me, ive got a signature, uohh look at me!" :) |
|
davemaxwell
Access 2000 Support Moderator
USA
3020 Posts |
Posted - 12 July 2001 : 14:03:30
|
A couple things. "Text" is a reserved word for Access2000 fields. Renaming that field would probably be a good idea. If the field is defined as a memo, move it to the end of the insert and it might work also....
Dave Maxwell -------------- Proud to be a "World Class" Knucklehead |
|
|
Spoon
Average Member
Ireland
507 Posts |
Posted - 12 July 2001 : 16:08:04
|
quote:
A couple things. "Text" is a reserved word for Access2000 fields. Renaming that field would probably be a good idea. If the field is defined as a memo, move it to the end of the insert and it might work also....
Dave Maxwell -------------- Proud to be a "World Class" Knucklehead
Solved it, thanks a million
Spoon
"uohh look at me, ive got a signature, uohh look at me!" :) |
|
|
|
Topic |
|
|
|