Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't Update DB

Status
Not open for further replies.

streborr

IS-IT--Management
Jan 16, 2002
98
I can't update my db:

<%
dim dbc, strConn, rs, sql
strConn = &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\fpdb\leadinput.mdb;User ID=;Password=;&quot;
Set dbc = Server.CreateObject(&quot;ADODB.Connection&quot;)
set dbc.connectionstring = strConn

dbc.open
set rs = Server.CreateObject(&quot;ADODB.Recordset&quot;)
rs.locktype = 3
rs.cursortype = 1

sql = &quot;UPDATE Distributors SET dist_no = '&quot; & dist_no & &quot;', dist_name = '&quot; & dist_name & &quot;', dist_addr1 = '&quot; & dist_Addr1 & &quot;', &quot;
sql = sql & &quot;dist_Addr2 = '&quot; & dist_addr2 & &quot;', dist_city = '&quot; & dist_city & &quot;', dist_state = '&quot; & dist_state & &quot;', &quot;
sql = sql & &quot;dist_Zip = '&quot; & dist_Zip & &quot;', dist_region = '&quot; & dist_region & &quot;', dist_parent = '&quot; & dist_parent & &quot;', &quot;
sql = sql & &quot;WHERE dist_name ='&quot; & dist_name & &quot;'&quot;

rs.Execute sql

rs.close
set rs = nothing
set dbc = nothing
response.redirect &quot;distadmin.asp&quot;
%>
Any Ideas?
Thanks
 
response.write your sql statement, and see if you can execute the output directly on your database. It will give you a more intelligible error message than the ODBC driver will.

If it's still not apparent, the post back your output, and let's have a look.

:)
paul
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top