catalyst2 community forums  

Go Back   catalyst2 community forums > Support > Scripting Support

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 26-05-2006, 01:50 PM   #1 (permalink)
Registered User
 
Join Date: May 2006
Posts: 2
writing to access db

Hi,

I have an issue when trying to insert data into my Access DB thru ASP pages.

We have no issues using t-SQL SELECT statements, but when we try:

<%
oConn.Execute("INSERT INTO tComments(author,comments,ip,date) values('" & author & "','" & comments & "','" & ip & "', getdate())")
%>

But get this error:

"Microsoft JET Database Engine error '80040e14'

Syntax error in INSERT INTO statement."

So I tried this standard code:

<%
Set objrs1 = Server.CreateObject ("ADODB.Recordset")
objrs1.Open "tComments", strConnect,1,3,2
objrs1.AddNew
objrs1("Author") = author
objrs1("Comments") = comments
objrs1("IPAddress") = ip
objrs1("Date") = Date()
objrs1.Update
objrs1.Close
Set objrs1 = Nothing
%>

And get this error, despite me having check all permissions on the mdb via our FTP client:

"Microsoft JET Database Engine error '80040e09'

Cannot update. Database or object is read-only."

Any help would be greatly appreciated
Edgar is offline   Reply With Quote
Old 26-05-2006, 04:25 PM   #2 (permalink)
Bring me your problems :p
 
paulredpath's Avatar
 
Join Date: Jan 2003
Location: /dev/ahhhhhhhhh
Posts: 3,537
Hi,

Is the database in the /db directory we provide?
paulredpath is offline   Reply With Quote
Old 30-05-2006, 09:14 AM   #3 (permalink)
Registered User
 
Join Date: May 2006
Posts: 2
Ah, no, it should be? I'll get it moved
cheers
Edgar is offline   Reply With Quote
Old 30-05-2006, 11:01 AM   #4 (permalink)
Bring me your problems :p
 
paulredpath's Avatar
 
Join Date: Jan 2003
Location: /dev/ahhhhhhhhh
Posts: 3,537
Yep
paulredpath is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 01:32 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.