N
Nancy.
Hello:
I have a dataset field:
Description='STRUCTURES. SWALE INLET TYPE D-3(36" DIA.)
(<10' DEEP)'
I want to save several fields including the description
into a SQL table.
The replace("'","''") should pass the string as :
'STRUCTURES. SWALE INLET TYPE D-3(36" DIA.)(<10'' DEEP)'
But, instead keeps writing the two singles after writing
a comma which confuses the statesment:
'STRUCTURES. SWALE INLET TYPE D-3(36" DIA.)(<10',''
DEEP)'
This is my Insert code:
m_StrQuery = "INSERT INTO TABLE_A " & _
"(awardid, pwnumber,
itemnumber,description,unitid,contractquantity,contractuni
tprice,typeflag,ntuser,datein) VALUES " & _
" ('" & awardid & "','" & _
pwnumber & "','" & _
itemnumber & "','" & _
description.Replace("'", "''") &
_
"','" & unitid & " '," & _
contractqty & "," & _
contractprice & ",'" & _
typeflag & "','" & _
m_strWinNTUser & "','" & _
dtToday & "')"
Could you please let me know how should I do it?
Thanks!
Nancy.
I have a dataset field:
Description='STRUCTURES. SWALE INLET TYPE D-3(36" DIA.)
(<10' DEEP)'
I want to save several fields including the description
into a SQL table.
The replace("'","''") should pass the string as :
'STRUCTURES. SWALE INLET TYPE D-3(36" DIA.)(<10'' DEEP)'
But, instead keeps writing the two singles after writing
a comma which confuses the statesment:
'STRUCTURES. SWALE INLET TYPE D-3(36" DIA.)(<10',''
DEEP)'
This is my Insert code:
m_StrQuery = "INSERT INTO TABLE_A " & _
"(awardid, pwnumber,
itemnumber,description,unitid,contractquantity,contractuni
tprice,typeflag,ntuser,datein) VALUES " & _
" ('" & awardid & "','" & _
pwnumber & "','" & _
itemnumber & "','" & _
description.Replace("'", "''") &
_
"','" & unitid & " '," & _
contractqty & "," & _
contractprice & ",'" & _
typeflag & "','" & _
m_strWinNTUser & "','" & _
dtToday & "')"
Could you please let me know how should I do it?
Thanks!
Nancy.