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!

Newbie: "stream" object in C# (Blob-Clob)

Status
Not open for further replies.

eramgarden

Programmer
Aug 27, 2003
279
US
I've inherited a small VB6 app. It uses "stream" object (but not sure) to convert text field to varchar.

I want to upgrade this VB6 app to C# and wondering if there's a way in to do the same

This is some of the code ex-developer has:

============
'Add to stream
xSQLtrans2.stmGen1.Type = adTypeText
xSQLtrans2.stmGen1.Charset = "us-ascii"

If xSQLtrans2.stmGen1.Size < 204 Then
xSQLtrans2.stmGen1.Position = xSQLtrans2.stmGen1.Size
Else

xSQLtrans2.stmGen1.Position = 204


End If

vtrRst = xSQLtrans2.stmGen1.ReadText



'Remove Quotes


If InStr(1, vtrRst, Chr(39)) > 0 Or InStr(1, vtrRst, Chr(34)) Then
For Lcounter = 1 To Len(vtrRst)
If Mid$(vtrRst, Lcounter, 1) = Chr(39) Or Mid$(vtrRst, Lcounter, 1) = Chr(34) Then
Mid(vtrRst, Lcounter, 1) = &quot;^&quot;
End If
Next


End If



vtrRst = Trim$(vtrRst)


frmAdmin.Text1.Text = vtrRst


vtrRst = Mid$(vtrRst, 1, Len(frmAdmin.Text1.Text))

vtrRst = Replace(vtrRst, Chr$(15), Chr$(32))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top