goaganesha
Programmer
Hi there,
I've made a website which works fine at home. Once I upload it to the remote server, only the pages with an sql select statement open fine, once I try to insert something in the database, I get an internal servererror 500.
I tried using the insert into... sql statement and de recordset "addnew " function but both fail. Does anyone know what could be going wrong since everything works fine at my own pc.
Could it have something to do with the fact that I'm not using a dsn to connect to the database, but a relative path??
Here is the code:
<%Option Explicit
Dim strConnect, accessdb
accessdb=server.mappath("resume.mdb"
strConnect ="Provider=Microsoft.Jet.OLEDB.4.0;" &_
"Jet OLEDBatabase Password=test;" &_
"Data Source="&accessdb&";" &_
"Persist Security Info=False" %>
<% Dim RS, Conn, query
Set Conn= Server.CreateObject("ADODB.Connection"
Set RS = Server.CreateObject("ADODB.Recordset"
query = "SELECT * FROM user"
Conn.open strConnect
RS.open query,Conn,1,3
RS.AddNew
RS("userID"= 20
RS("type"="test"
RS("knowledge"="test"
RS.update
RS.close
set RS = nothing
Conn.close
set Conn = nothing
%>
regards, goaganesha
I've made a website which works fine at home. Once I upload it to the remote server, only the pages with an sql select statement open fine, once I try to insert something in the database, I get an internal servererror 500.
I tried using the insert into... sql statement and de recordset "addnew " function but both fail. Does anyone know what could be going wrong since everything works fine at my own pc.
Could it have something to do with the fact that I'm not using a dsn to connect to the database, but a relative path??
Here is the code:
<%Option Explicit
Dim strConnect, accessdb
accessdb=server.mappath("resume.mdb"
strConnect ="Provider=Microsoft.Jet.OLEDB.4.0;" &_
"Jet OLEDBatabase Password=test;" &_
"Data Source="&accessdb&";" &_
"Persist Security Info=False" %>
<% Dim RS, Conn, query
Set Conn= Server.CreateObject("ADODB.Connection"
Set RS = Server.CreateObject("ADODB.Recordset"
query = "SELECT * FROM user"
Conn.open strConnect
RS.open query,Conn,1,3
RS.AddNew
RS("userID"= 20
RS("type"="test"
RS("knowledge"="test"
RS.update
RS.close
set RS = nothing
Conn.close
set Conn = nothing
%>
regards, goaganesha