Here is my code that retrieves the data. It's weird because I don't get
the 'x' when I run the same query in ControlCenter. It's only when
using the code below. Also this is the first time that I have seen
this. This code works perfect with all my other queries.
Dim cn As New ADODB.Connection
Dim cn2 As New ADODB.Connection
Dim RS As New ADODB.Recordset
Dim fld As ADODB.Field
Dim DataArray() As String
Dim i As Long
Dim j As Integer
If strFileName <> "" Then
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
strFileName & ";Persist Security Info=False"
If cn.State = adStateOpen Then
' Open employee table.
Set RS = New ADODB.Recordset
RS.Source = strSQL
Set RS.ActiveConnection = cn
RS.CursorLocation = adUseClient
RS.Open
ReDim DataArray(RS.Fields.Count - 1, RS.RecordCount) ' set
the size of the array that we're storing the recordset into.
For Each fld In RS.Fields ' we put the recordset field
names in the zero record of the array
DataArray(i, 0) = fld.Name
i = i + 1
Next
If RS.RecordCount > 0 Then
For i = 1 To RS.RecordCount ' count through the rows
For Each fld In RS.Fields ' count through the
fields
DataArray(j, i) = fld.Value & "" ' always
append a empty string to the value in the recordset to make sure we
don't have any NULLs stored in the array.
j = j + 1
Next
RS.MoveNext
j = 0
Next i
End If
>>> Victor Pendleton <[EMAIL PROTECTED]> 3/11/2004 1:15:45 PM >>>
Can you post some sample data and ddl?
-----Original Message-----
From: Jacque Scott
To: [EMAIL PROTECTED]
Sent: 3/11/04 3:12 PM
Subject: Mysterious 'x' when retrieving records
I have a very simple query
SELECT ProblemReports.* FROM ProbelmReports;
If there is no data in the column 'Description' it returns 'x'. There
is no default value being used and there is no data in the field. Why
would it return 'x'? The field type is 'TEXT'. I have another 'TEXT'
field in the same table and it doesn't do this.
Does anyone have any suggestions?
Jacque