Hi.
I have a page nido_new.asp from which I key in the relevant information or select information from database-retreived records. This page will direct to another page nido_new_ins.asp. In this page I have an include file as below:
<!--#include file="../common/connection
.asp"-->
The connection.asp consist of the following code:
<%
dim oDBConn
set oDBConn=Server.CreateObjec
t("ADODB.C
onnection"
)
'Common Server Connection
oDBConn.Open "DSN=pacdbs;uid=;password=
"
%>
In nido_new_ins, I retrive the form variables fron nido_new and put them into an sql statement.
When I try to write to access database using the following command:
sqlcmd="Insert into pacdo (pacdoid,orderfulfilmentpr
efix,order
fulfilment
id,do_acco
untid,do_c
alldate,do
_calltimeh
h,do_callt
imemm,do_c
alltypeid,
" & _
"do_memberid,do_ctrequesto
rname,do_t
ripchargei
d,do_worko
rderid,do_
workordert
ypeid,do_a
ppointment
date,do_ap
pointmentt
imehh,do_a
ppointment
timemm,do_
appointmen
ttimetypei
d, " & _
"do_sitename,do_siteaddres
s1,do_site
address2,d
o_engineer
code,do_en
gineername
,do_engine
ercontact,
do_special
instructio
n,countryi
d,regdate,
deleteflag
,pacstatus
flag)" & _
"values(" & pacdoid & ",'" & orderfulfilmentprefix & "'," & orderfulfilmentid & "," & accountid & ",#" & calldate & "#," & calltimehh & "," & _
calltimemm & "," & calltypeid & "," & memberid & ",'" & ctrequestorname & "'," & tripchargeid & ",'" & workorderid & "'," & workordertypeid & ",#" & _
appointmentdate & "#," & appointmenttimehh & "," & appointmenttimemm & "," & appointmenttimetype & ",'" & sitename & "','" & siteaddress1 & "','" & siteaddress2 & "','" & engineercode & "','" & _
engineername & "','" & engineercontact & "','" & specialinstruction & "'," & countryid & ",#" & regdate & "#,0,0)"
oDBConn.Execute sqlcmd
I get an error an error below:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/pacsol/admin/sys/table_ch
ange/nido/
nido_new_i
ns.asp, line 65
Maybe because of access rights issue? Anybody can give suggestions on how to solve this problem?
There was no problem retreiving records from database, but when I try to insert new record the error occurs.
Many thanks in advance.
Start Free Trial