Link to home
Start Free TrialLog in
Avatar of sharfaa
sharfaa

asked on

add records to an access database using asp

Hi experts,
   I'm trying to add records to an access database using asp. Please see my code below that I'm using. Its not working. I ;m having an error at line 39  which is "conn.execute(ins)". I'm trying what I know , but its not solving the problem. Please tell me what to do.

My code are
<html>
<link rel="stylesheet" type="text/css" href="../main.css">
<!--#include file="connect.asp" -->
<link rel="stylesheet" type="text/css" href="../main.css">
<body>
<%


fname=request("fname")
lname=request("lname")
address=request("address")
city=request("city")
state=request("state")
country=request("country")
phone=request("phone")
email=request("email")
p_name=request("p_name")
password1=request("password1")
flag=request("flag")



Set rsAddComments1 = Server.CreateObject("ADODB.Recordset")
sql="select count(*) from login1 where username1='"&p_name&"' "


rsAddComments1.Open sql, Conn
set rr=conn.execute(sql)
rsAddComments1.close

'if  not flag="ins" and rr(0)=0  then
'      'response.write "record found"
'      ins1 ="update customer set firstname='"&fname&"',lastname='"&lname&"',add1='"&address&"',city='"&city&"',"
'      ins1= ins1 & "state='"&state&"',country='"&country&"',phone="&phone&",email='"&email&"' where userid="&userid(0)&" "
'      conn.execute(ins1)
'      response.write(" Record must be in Data Base & Update")
'else
if flag="ins" then

      ins ="insert into login1(username1,password1) values('"&p_name&"','"&password1&"')"
      conn.execute(ins)

      sql="select userid from login1 where username1='"&p_name&"'"
      set userid=conn.execute(sql)
      'response.write userid(0)

      ins1 ="insert into customer(firstname,lastname,add1,city,state,country,phone,email,userid)"
      ins1 = ins1 & "values('"&fname&"','"&lname&"','"&address&"','"&city&"','"&state&"','"&country&"'"
      ins1 = ins1 & ","&phone&",'"&email&"',"&userid(0)&")"
else
        sql="select userid from login1 where username1='"&session("userid")&"'"
      set userid=conn.execute(sql)
        userid = session("userid")
      ins1 ="update customer set firstname='"&fname&"',lastname='"&lname&"',add1='"&address&"',city='"&city&"',"
      ins1= ins1 & "state='"&state&"',country='"&country&"',phone="&phone&",email='"&email&"' where userid="&userid&""
      

end if
'response.write ins1


conn.execute(ins1)


'end if
 
'response.end
    tt=session("psoid")
   


%>
<B> Your Data Has been saved</b><br><br><br><br><br>
<br><font face="Wingdings" color="#008000">Q  </font><a href="update_profile.asp" >Update profile</a>
<br>
<font face="Wingdings" color="#008000">Q  </font><a href="chg_pass.asp" >Change Password</a><BR>
<font face="Wingdings" color="#008000">Q  </font><a href="flight_search.asp" >reservation and cancelation</a>


<br>

</body>
</html>
Avatar of jmelika
jmelika

What is the full error message?  Is your connection opened before you execute the SQL?  conn.Open?  You need to open it (conn.Open) and then conn.Close when done with it.

Try:
conn.Open
conn.execute(ins1)
conn.Close
Avatar of Zvonko
What is Conn in your source?
Is it ConnectionString or object of type ADODB.Connection?

Look here: http:Q_10770301.html
I mean in this two lines it is first used as connection string and in the next line as connection object:

rsAddComments1.Open sql, Conn
set rr=conn.execute(sql)

Sorry about the type in my code.  Here is the right code

conn.Open sql
conn.execute(ins1)
conn.Close
Avatar of sharfaa

ASKER

none of your answers have solved the problem. Please see where I have left the mistakes
Avatar of sharfaa

ASKER

This is the error that I have in my browser

Technical Information (for support personnel)

Error Type:
ADODB.Connection (0x800A0E79)
Operation is not allowed when the object is open.
/airline/member/input_submit.asp, line 41


What is the content of:

<--#include file="connect.asp" -->


FtB
Avatar of sharfaa

ASKER

Hi Mr Genius,
I very happy that you are looking at my question

here is your answer of connect.asp

<html>
<body>
<%
set Conn = Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/Inetpub/wwwroot/airline/airm.mdb"
%>
</body>
</html>
Okay, we are going to do a little trouble shooting step by step. In a new page, try this and then tell me the result.

<html>
<link rel="stylesheet" type="text/css" href="../main.css">
<link rel="stylesheet" type="text/css" href="../main.css">
<body>
<%

set Conn = Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/Inetpub/wwwroot/airline/airm.mdb"

Response.write("The connection state is: " & Conn.state)
Response.end

fname=request("fname")
lname=request("lname")
address=request("address")
city=request("city")
state=request("state")
country=request("country")
phone=request("phone")
email=request("email")
p_name=request("p_name")
password1=request("password1")
flag=request("flag")



Set rsAddComments1 = Server.CreateObject("ADODB.Recordset")
sql="select count(*) from login1 where username1='"&p_name&"' "


rsAddComments1.Open sql, Conn
set rr=conn.execute(sql)
rsAddComments1.close

'if  not flag="ins" and rr(0)=0  then
'     'response.write "record found"
'     ins1 ="update customer set firstname='"&fname&"',lastname='"&lname&"',add1='"&address&"',city='"&city&"',"
'     ins1= ins1 & "state='"&state&"',country='"&country&"',phone="&phone&",email='"&email&"' where userid="&userid(0)&" "
'     conn.execute(ins1)
'     response.write(" Record must be in Data Base & Update")
'else
if flag="ins" then

     ins ="insert into login1(username1,password1) values('"&p_name&"','"&password1&"')"
     conn.execute(ins)

     sql="select userid from login1 where username1='"&p_name&"'"
     set userid=conn.execute(sql)
     'response.write userid(0)

     ins1 ="insert into customer(firstname,lastname,add1,city,state,country,phone,email,userid)"
     ins1 = ins1 & "values('"&fname&"','"&lname&"','"&address&"','"&city&"','"&state&"','"&country&"'"
     ins1 = ins1 & ","&phone&",'"&email&"',"&userid(0)&")"
else
        sql="select userid from login1 where username1='"&session("userid")&"'"
     set userid=conn.execute(sql)
        userid = session("userid")
     ins1 ="update customer set firstname='"&fname&"',lastname='"&lname&"',add1='"&address&"',city='"&city&"',"
     ins1= ins1 & "state='"&state&"',country='"&country&"',phone="&phone&",email='"&email&"' where userid="&userid&""
     

end if
'response.write ins1


conn.execute(ins1)


'end if
 
'response.end
    tt=session("psoid")
   


%>
<B> Your Data Has been saved</b><br><br><br><br><br>
<br><font face="Wingdings" color="#008000">Q  </font><a href="update_profile.asp" >Update profile</a>
<br>
<font face="Wingdings" color="#008000">Q  </font><a href="chg_pass.asp" >Change Password</a><BR>
<font face="Wingdings" color="#008000">Q  </font><a href="flight_search.asp" >reservation and cancelation</a>


<br>

</body>
</html>
Avatar of sharfaa

ASKER

The result is as follows

The connection state is: 1
Excellent!

Hang on a second for the next step.

FtB
<html>
<link rel="stylesheet" type="text/css" href="../main.css">
<link rel="stylesheet" type="text/css" href="../main.css">
<body>
<%

set Conn = Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/Inetpub/wwwroot/airline/airm.mdb"

fname=request("fname")
lname=request("lname")
address=request("address")
city=request("city")
state=request("state")
country=request("country")
phone=request("phone")
email=request("email")
p_name=request("p_name")
password1=request("password1")
flag=request("flag")



Set rsAddComments1 = Server.CreateObject("ADODB.Recordset")
sql="select count(*) from login1 where username1='"&p_name&"' "


rsAddComments1.Open sql, Conn


Response.write("The rsAddComments1 state is: " & rsAddComments1.state)
Response.end


set rr=conn.execute(sql)
rsAddComments1.close

'if  not flag="ins" and rr(0)=0  then
'     'response.write "record found"
'     ins1 ="update customer set firstname='"&fname&"',lastname='"&lname&"',add1='"&address&"',city='"&city&"',"
'     ins1= ins1 & "state='"&state&"',country='"&country&"',phone="&phone&",email='"&email&"' where userid="&userid(0)&" "
'     conn.execute(ins1)
'     response.write(" Record must be in Data Base & Update")
'else
if flag="ins" then

     ins ="insert into login1(username1,password1) values('"&p_name&"','"&password1&"')"
     conn.execute(ins)

     sql="select userid from login1 where username1='"&p_name&"'"
     set userid=conn.execute(sql)
     'response.write userid(0)

     ins1 ="insert into customer(firstname,lastname,add1,city,state,country,phone,email,userid)"
     ins1 = ins1 & "values('"&fname&"','"&lname&"','"&address&"','"&city&"','"&state&"','"&country&"'"
     ins1 = ins1 & ","&phone&",'"&email&"',"&userid(0)&")"
else
        sql="select userid from login1 where username1='"&session("userid")&"'"
     set userid=conn.execute(sql)
        userid = session("userid")
     ins1 ="update customer set firstname='"&fname&"',lastname='"&lname&"',add1='"&address&"',city='"&city&"',"
     ins1= ins1 & "state='"&state&"',country='"&country&"',phone="&phone&",email='"&email&"' where userid="&userid&""
     

end if
'response.write ins1


conn.execute(ins1)


'end if
 
'response.end
    tt=session("psoid")
   


%>
<B> Your Data Has been saved</b><br><br><br><br><br>
<br><font face="Wingdings" color="#008000">Q  </font><a href="update_profile.asp" >Update profile</a>
<br>
<font face="Wingdings" color="#008000">Q  </font><a href="chg_pass.asp" >Change Password</a><BR>
<font face="Wingdings" color="#008000">Q  </font><a href="flight_search.asp" >reservation and cancelation</a>


<br>

</body>
</html>
Avatar of sharfaa

ASKER

new result

The rsAddComments1 state is: 1

Looking good! Hang on for a minute for the next bit.

FtB
<html>
<link rel="stylesheet" type="text/css" href="../main.css">
<link rel="stylesheet" type="text/css" href="../main.css">
<body>
<%

set Conn = Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/Inetpub/wwwroot/airline/airm.mdb"

fname=request("fname")
lname=request("lname")
address=request("address")
city=request("city")
state=request("state")
country=request("country")
phone=request("phone")
email=request("email")
p_name=request("p_name")
password1=request("password1")
flag=request("flag")



Set rsAddComments1 = Server.CreateObject("ADODB.Recordset")
sql="select count(*) from login1 where username1='"&p_name&"' "


rsAddComments1.Open sql, Conn


set rr=conn.execute(sql)
rsAddComments1.close

'if  not flag="ins" and rr(0)=0  then
'     'response.write "record found"
'     ins1 ="update customer set firstname='"&fname&"',lastname='"&lname&"',add1='"&address&"',city='"&city&"',"
'     ins1= ins1 & "state='"&state&"',country='"&country&"',phone="&phone&",email='"&email&"' where userid="&userid(0)&" "
'     conn.execute(ins1)
'     response.write(" Record must be in Data Base & Update")
'else
if flag="ins" then
   
     ins ="insert into login1(username1,password1) values('"&p_name&"','"&password1&"')"
     response.write("ins sql: " & ins)
       response.end

       conn.execute(ins)

     sql="select userid from login1 where username1='"&p_name&"'"
     set userid=conn.execute(sql)
     'response.write userid(0)

     ins1 ="insert into customer(firstname,lastname,add1,city,state,country,phone,email,userid)"
     ins1 = ins1 & "values('"&fname&"','"&lname&"','"&address&"','"&city&"','"&state&"','"&country&"'"
     ins1 = ins1 & ","&phone&",'"&email&"',"&userid(0)&")"
else
        sql="select userid from login1 where username1='"&session("userid")&"'"
     set userid=conn.execute(sql)
        userid = session("userid")
     ins1 ="update customer set firstname='"&fname&"',lastname='"&lname&"',add1='"&address&"',city='"&city&"',"
     ins1= ins1 & "state='"&state&"',country='"&country&"',phone="&phone&",email='"&email&"' where userid="&userid&""
     

end if
'response.write ins1


conn.execute(ins1)


'end if
 
'response.end
    tt=session("psoid")
   


%>
<B> Your Data Has been saved</b><br><br><br><br><br>
<br><font face="Wingdings" color="#008000">Q  </font><a href="update_profile.asp" >Update profile</a>
<br>
<font face="Wingdings" color="#008000">Q  </font><a href="chg_pass.asp" >Change Password</a><BR>
<font face="Wingdings" color="#008000">Q  </font><a href="flight_search.asp" >reservation and cancelation</a>


<br>

</body>
</html>
Avatar of sharfaa

ASKER

next result

ins sql: insert into login1(username1,password1) values('masa','pass')
Next:

<html>
<link rel="stylesheet" type="text/css" href="../main.css">
<link rel="stylesheet" type="text/css" href="../main.css">
<body>
<%

set Conn = Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/Inetpub/wwwroot/airline/airm.mdb"

fname=request("fname")
lname=request("lname")
address=request("address")
city=request("city")
state=request("state")
country=request("country")
phone=request("phone")
email=request("email")
p_name=request("p_name")
password1=request("password1")
flag=request("flag")



Set rsAddComments1 = Server.CreateObject("ADODB.Recordset")
sql="select count(*) from login1 where username1='"&p_name&"' "


rsAddComments1.Open sql, Conn


set rr=conn.execute(sql)
rsAddComments1.close

'if  not flag="ins" and rr(0)=0  then
'     'response.write "record found"
'     ins1 ="update customer set firstname='"&fname&"',lastname='"&lname&"',add1='"&address&"',city='"&city&"',"
'     ins1= ins1 & "state='"&state&"',country='"&country&"',phone="&phone&",email='"&email&"' where userid="&userid(0)&" "
'     conn.execute(ins1)
'     response.write(" Record must be in Data Base & Update")
'else
if flag="ins" then
   
     ins ="insert into login1(username1,password1) values('"&p_name&"','"&password1&"')"

       conn.execute(ins)
     response.write("Insert Executed!")
       response.end


     sql="select userid from login1 where username1='"&p_name&"'"
     set userid=conn.execute(sql)
     'response.write userid(0)

     ins1 ="insert into customer(firstname,lastname,add1,city,state,country,phone,email,userid)"
     ins1 = ins1 & "values('"&fname&"','"&lname&"','"&address&"','"&city&"','"&state&"','"&country&"'"
     ins1 = ins1 & ","&phone&",'"&email&"',"&userid(0)&")"
else
        sql="select userid from login1 where username1='"&session("userid")&"'"
     set userid=conn.execute(sql)
        userid = session("userid")
     ins1 ="update customer set firstname='"&fname&"',lastname='"&lname&"',add1='"&address&"',city='"&city&"',"
     ins1= ins1 & "state='"&state&"',country='"&country&"',phone="&phone&",email='"&email&"' where userid="&userid&""
     

end if
'response.write ins1


conn.execute(ins1)


'end if
 
'response.end
    tt=session("psoid")
   


%>
<B> Your Data Has been saved</b><br><br><br><br><br>
<br><font face="Wingdings" color="#008000">Q  </font><a href="update_profile.asp" >Update profile</a>
<br>
<font face="Wingdings" color="#008000">Q  </font><a href="chg_pass.asp" >Change Password</a><BR>
<font face="Wingdings" color="#008000">Q  </font><a href="flight_search.asp" >reservation and cancelation</a>


<br>

</body>
</html>
Avatar of sharfaa

ASKER

as seen in browser

Technical Information (for support personnel)

Error Type:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/airline/member/input_submit.asp, line 46


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Page:
POST 182 bytes to /airline/member/input_submit.asp

POST Data:
flag=ins&fname=Ashraf&lname=AUBAD&address=rouillard&city=Terre-Rouge&state=Pamplemousses&country=Mauritius&phone=5490261&email=masa@trop.com&p_name=masa&password1=pass&password2=pass

Time:
Sunday, November 14, 2004, 2:44:21 AM
Okay great. Please hang on a minute.

FtB
We are down to one of two or three problems. Please try this:

<html>
<link rel="stylesheet" type="text/css" href="../main.css">
<link rel="stylesheet" type="text/css" href="../main.css">
<body>
<%
set Conn = Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/Inetpub/wwwroot/airline/airm.mdb"

strDataPath = "c:/Inetpub/wwwroot/airline/airm.mdb"
set conn=Server.CreateObject("ADODB.Connection")
strConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;"_
                  + " Data Source= " & strDataPath & ";"_
                  + " Mode=Share Deny None;PASSWORD=;"

conn.ConnectionTimeout = 15
conn.CommandTimeout =  10
conn.Mode = 3 'adModeReadWrite
if conn.state = 0 then
      conn.Open strConnectString
end if

fname=request("fname")
lname=request("lname")
address=request("address")
city=request("city")
state=request("state")
country=request("country")
phone=request("phone")
email=request("email")
p_name=request("p_name")
password1=request("password1")
flag=request("flag")



Set rsAddComments1 = Server.CreateObject("ADODB.Recordset")
sql="select count(*) from login1 where username1='"&p_name&"' "


rsAddComments1.Open sql, Conn


set rr=conn.execute(sql)
rsAddComments1.close

'if  not flag="ins" and rr(0)=0  then
'     'response.write "record found"
'     ins1 ="update customer set firstname='"&fname&"',lastname='"&lname&"',add1='"&address&"',city='"&city&"',"
'     ins1= ins1 & "state='"&state&"',country='"&country&"',phone="&phone&",email='"&email&"' where userid="&userid(0)&" "
'     conn.execute(ins1)
'     response.write(" Record must be in Data Base & Update")
'else
if flag="ins" then
   
     ins ="insert into login1(username1,password1) values('"&p_name&"','"&password1&"')"

       conn.execute(ins)
     response.write("Insert Executed!")
       response.end


     sql="select userid from login1 where username1='"&p_name&"'"
     set userid=conn.execute(sql)
     'response.write userid(0)

     ins1 ="insert into customer(firstname,lastname,add1,city,state,country,phone,email,userid)"
     ins1 = ins1 & "values('"&fname&"','"&lname&"','"&address&"','"&city&"','"&state&"','"&country&"'"
     ins1 = ins1 & ","&phone&",'"&email&"',"&userid(0)&")"
else
        sql="select userid from login1 where username1='"&session("userid")&"'"
     set userid=conn.execute(sql)
        userid = session("userid")
     ins1 ="update customer set firstname='"&fname&"',lastname='"&lname&"',add1='"&address&"',city='"&city&"',"
     ins1= ins1 & "state='"&state&"',country='"&country&"',phone="&phone&",email='"&email&"' where userid="&userid&""
     

end if
'response.write ins1


conn.execute(ins1)


'end if
 
'response.end
    tt=session("psoid")
   


%>
<B> Your Data Has been saved</b><br><br><br><br><br>
<br><font face="Wingdings" color="#008000">Q  </font><a href="update_profile.asp" >Update profile</a>
<br>
<font face="Wingdings" color="#008000">Q  </font><a href="chg_pass.asp" >Change Password</a><BR>
<font face="Wingdings" color="#008000">Q  </font><a href="flight_search.asp" >reservation and cancelation</a>


<br>

</body>
</html>

FtB
Avatar of sharfaa

ASKER

Latest result
Technical Information (for support personnel)

Error Type:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/airline/member/input_submit.asp, line 58


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Page:
POST 182 bytes to /airline/member/input_submit.asp

POST Data:
flag=ins&fname=Ashraf&lname=AUBAD&address=rouillard&city=Terre-Rouge&state=Pamplemousses&country=Mauritius&phone=5490261&email=masa@trop.com&p_name=masa&password1=pass&password2=pass

Time:
Sunday, November 14, 2004, 2:51:19 AM
Okay, I think that I know what is going on now--it looks like you have a permissions issue. Is this your server or a hosting server? What we need is for the IUSR_ account to have READ/WRITE permissions for the airline/ directory. Also, right click on the .mdb file to make certain that it is not read only.

FtB

Avatar of sharfaa

ASKER

I'm using my own machine as server-Simulating with IIS
Avatar of sharfaa

ASKER

Have check permission on mdb-Its not read only
Avatar of sharfaa

ASKER

can I upload my pages somewhere-so that you have a better idea of the problem
Okay, so visit the airline directory, right click on it to check the permissions. The IUSR_ account must have READ/WRITE permissions.

FtB
That won't help--what I need is to see your server. In any event, please see my last comment about the IUSR permissions.

FtB
Avatar of sharfaa

ASKER

Now i have this comments after checking the permissions with IIS server

Insert Executed!
Excellent. Can you verify that the record was inserted?

ftB
If so, then your code should look like this to go all of the way through:

<html>
<link rel="stylesheet" type="text/css" href="../main.css">
<link rel="stylesheet" type="text/css" href="../main.css">
<body>
<%
set Conn = Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/Inetpub/wwwroot/airline/airm.mdb"

strDataPath = "c:/Inetpub/wwwroot/airline/airm.mdb"
set conn=Server.CreateObject("ADODB.Connection")
strConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;"_
                  + " Data Source= " & strDataPath & ";"_
                  + " Mode=Share Deny None;PASSWORD=;"

conn.ConnectionTimeout = 15
conn.CommandTimeout =  10
conn.Mode = 3 'adModeReadWrite
if conn.state = 0 then
      conn.Open strConnectString
end if

fname=request("fname")
lname=request("lname")
address=request("address")
city=request("city")
state=request("state")
country=request("country")
phone=request("phone")
email=request("email")
p_name=request("p_name")
password1=request("password1")
flag=request("flag")



Set rsAddComments1 = Server.CreateObject("ADODB.Recordset")
sql="select count(*) from login1 where username1='"&p_name&"' "


rsAddComments1.Open sql, Conn


set rr=conn.execute(sql)
rsAddComments1.close

'if  not flag="ins" and rr(0)=0  then
'     'response.write "record found"
'     ins1 ="update customer set firstname='"&fname&"',lastname='"&lname&"',add1='"&address&"',city='"&city&"',"
'     ins1= ins1 & "state='"&state&"',country='"&country&"',phone="&phone&",email='"&email&"' where userid="&userid(0)&" "
'     conn.execute(ins1)
'     response.write(" Record must be in Data Base & Update")
'else
if flag="ins" then
   
     ins ="insert into login1(username1,password1) values('"&p_name&"','"&password1&"')"
       conn.execute(ins)

     sql="select userid from login1 where username1='"&p_name&"'"
     set userid=conn.execute(sql)
     'response.write userid(0)

     ins1 ="insert into customer(firstname,lastname,add1,city,state,country,phone,email,userid)"
     ins1 = ins1 & "values('"&fname&"','"&lname&"','"&address&"','"&city&"','"&state&"','"&country&"'"
     ins1 = ins1 & ","&phone&",'"&email&"',"&userid(0)&")"
else
        sql="select userid from login1 where username1='"&session("userid")&"'"
     set userid=conn.execute(sql)
        userid = session("userid")
     ins1 ="update customer set firstname='"&fname&"',lastname='"&lname&"',add1='"&address&"',city='"&city&"',"
     ins1= ins1 & "state='"&state&"',country='"&country&"',phone="&phone&",email='"&email&"' where userid="&userid&""
     

end if
'response.write ins1
conn.execute(ins1)
'end if

'response.end
    tt=session("psoid")
 %>
<B> Your Data Has been saved</b><br><br><br><br><br>
<br><font face="Wingdings" color="#008000">Q  </font><a href="update_profile.asp" >Update profile</a>
<br>
<font face="Wingdings" color="#008000">Q  </font><a href="chg_pass.asp" >Change Password</a><BR>
<font face="Wingdings" color="#008000">Q  </font><a href="flight_search.asp" >reservation and cancelation</a>
</body>
</html>

FtB
Avatar of sharfaa

ASKER

Yes the record was inserted in the login table
ASKER CERTIFIED SOLUTION
Avatar of fritz_the_blank
fritz_the_blank
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sharfaa

ASKER

Thanks a lot for your effort-Now I know where the problem was-It has to do with permissions as you have said
You are really a genius in ASP

thanks
Glad to have helped,

FtB

PS: Some good folks were helping you out earlier as well.

Come on Fritz, I would never guessed that the problem was access rights ;-)
I was only wondering why he executes the sql string twice!

rsAddComments1.Open sql, Conn

set rr=conn.execute(sql) '// << isn't this a problem before close() ???

rsAddComments1.close
I don't think so--you just get another recordset.

FtB
Ok, thanks.
But please don't quote me on that!!!! I prefer to do things more explicitly so that I can set the properties of the objects myself. i.e.:

dim rr
set rr = server.CreateObject("ADODB.RecordSet")
rr.Open strSQL,conn,3,3