Use conn.execute to execute an insert command as inserts don't return any 
records.

Conn.execute strSQL

Dan

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf 
Of Ehtisham
Sent: 12 August 2005 17:17
To: [email protected]
Subject: [ASP] Please Help

Can any one help me why my code is not entering data into database it gives 
error on (rs.Open strSQL, conn)

Please Help

<% @ Language=VBScript %>


<%

mvennam= request.form("vennam")
mvenadd= request.form("venaddr")
mnam1="Ehti"

Dim rs, conn, connect, strSQL

set conn=server.CreateObject ("adodb.connection") connect = 
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & Server.MapPath("trucking.mdb") & ";Persist Security Info=False"
conn.Open connect
set rs=Server.CreateObject("adodb.recordset")
strSQL = "insert into vend values('" & mnam1 & "')"

rs.Open strSQL, conn

'rs.Open strSQL, conn, adOpenKeyset, adLockOptimistic, adCmdText

'response.write(mvennam)
'response.write("<br>")
'response.write(mvenadd)

%>


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> <font 
face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hca33pr/M=362131.6882499.7825260.1510227/D=groups/S=1705115381:TM/Y=YAHOO/EXP=1123870618/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy</a>.</font> 
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [email protected]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links



 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hsicq7p/M=362131.6882499.7825260.1510227/D=groups/S=1705115381:TM/Y=YAHOO/EXP=1123871217/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [email protected]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to