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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anybody see whats wrong with this multiple update?

Status
Not open for further replies.

schase

Technical User
Sep 7, 2001
1,756
US
Hi all,

All the values are being passed a-ok, and database field names check out great - but I get the syntax error in update when I try to run it. Any ideas are greatly appreciated.

<%
Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
conn.open &quot;DSN=mydsn;&quot;
FOR i = 1 to Session(&quot;svRowCount&quot;)

SQLstmt = &quot;UPDATE tblDetail &quot;
SQLStmt = SQLstmt & &quot;SET fldPropertyID='&quot; & request.Form(&quot;txtDetailID&quot;)& i & &quot;',&quot;
SQLstmt = SQLstmt & &quot;fldDetail=&quot; & Request.Form(&quot;txtDetail&quot;) & i
SQLStmt = SQLStmt & &quot; WHERE detailID=&quot; & Request.Form(&quot;txtDetailNum&quot;)
Set RS = Conn.Execute(SQLStmt)
Next
set rs=nothing
Conn.Close
set conn=nothing
%> &quot;Damn the torpedoes, full speed ahead!&quot;

-Adm. James Farragut

Stuart
 
in the database, what data types are fldPropertyID and fldDetail? you're using quotes to enclose fldPropertyID, but you don't use them for fldDetail. does fldDetail hold a text value? if so, there's the problem (or a problem, at least).

glenn
 
I've actually got that reversed don't I?

fldPropertyID is set for number(Long Integer) as is detailID, which is also autonumber.

the fldDetail is set for text &quot;Damn the torpedoes, full speed ahead!&quot;

-Adm. James Farragut

Stuart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top