
February 6th, 2003, 06:06 PM
|
|
Registered User
|
|
Join Date: Feb 2003
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
I'm having Problems with my replace statement
<img src="/forum/emoticons/jumpin.gif" alt="jumpin"> Can someone please tell me what i'm doing wrong!!!!!! <img src="/forum/emoticons/jumpin.gif" alt="jumpin"> <br><br><%<br><br>OpenConnection()<br><br><br> Dim strSQL, rs1, rs2, rsInsert, newID<br><br> strSQL = "Select * From Temp_tblContractor_Import"<br> set rs1 = objConn.Execute(strSQL)<br><br> <br> Do While NOT rs1.EOF <br><br> strSQL = "Insert INTO HBC_Contact (Fname, Lname, Business_Name, Address1, City, Zip, Phone1) " <br> strSQL = strSQL & "VALUES ('" & replace(rs1("FName"), "'", "''"), '" & replace(rs1("LName"), "'", "''"), '" & replace(rs1("Business_Name"), "'", "''")& "', '" & replace(rs1("Address"), "'", "''")& "', '" & replace(rs1("City"), "'", "''")& "', '" & replace(rs1("Zip"), "'", "''")& "', '" & replace(rs1("Phone_No"), "'", "''")& "');"<br> strSQL = strSQL & "select @@identity"<br> set rsInsert = objconn.execute(strSQL).nextrecordset<br> <br> newID = rsInsert(0)<br> <br> strSQL = "Insert Into HBC_License_Holder (Contractor_No, Contact_ID) " <br> strSQL = strSQL & "VALUES ('" & rs1("Contractor_No") & "'," & newID & ");"<br> <br> 'objConn.Execute(strSQL)<br> <br> rs1.MoveNext()<br> Loop<br><br><br>CloseConnection()<br><br>Set rs1 = Nothing<br>Set rsInsert = Nothing
|