1. Using ADO GetString with MSHFlexgrid - problem with memo field
Y'all:
I'm using the code below to grab a big recordset from an Access MDB
file. The MDB file has several memo type fields with embedded
ctrl-enter characters.
I take the recordset and using the Clip procedure I stick it into my
MSHFlexgrid in one fell swoop. It works great as long as the memo
fields from the Access database DONT CONTAIN ctrl-enter characters.
Will I have to abandon the clip method (oh, its so nice and fast) and
do a field-by-field input of the data and parse each field looking for
and removing ctrl-enter characters? Please say no.
thanks,
russ
Dim conn As New ADODB.Connection
Dim ConnectionString As String
Dim fl As ADODB.Field
Dim rsVar As Variant
ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;" & _
"Password=pwd" & _
";Persist Security Info=True;" & _
"User ID=uid" & _
";Data Source=" & sFile & _
";Jet OLEDB:System database=" & App.Path & "\my.mdw"
conn.Open ConnectionString 'Open the ADO connection
Set rst = New ADODB.Recordset
rst.CursorLocation = adUseClient
rst.CursorType = adOpenDynamic
rst.LockType = adLockBatchOptimistic
rst.Open "MyTable", conn, , , adCmdTable 'grab the table
rst.MoveFirst
rsVar = rst.GetString(adClipString, rst.RecordCount) '<---------
With MSHFlexGrid1
.Cols = rst.Fields.Count
.Rows = rst.RecordCount
For i = 0 To rst.Fields.Count - 1
.TextMatrix(0, i) = rst.Fields(i).Name
Next
.Row = 1
.Col = 0
.RowSel = .Rows - 1
.ColSel = .Cols - 1
.Clip = rsVar '<------------ problemo code
.RowSel = .Row
.ColSel = .Col
End With
rst.Close
conn.Close
2. i/o buffer size for nt
3. MSHFlexGrid column headers
4. Sybase DBA - Ottawa Opportunity
5. MSHFlexgrid help needed!!
6. ODBC.NET + Windows Service = Hang
7. MshFlexGrid, ?Una porquerÃa?
8. VFP 3.0 vs VFP 5.0
9. MSHFlexgrid
10. decimal points in mshflexgrid
11. Sync-ing MSHFlexGrid control with other controls
12. MSHFlexGrid