scotts27
asked on
emory only recordset bound to a grid?
I got the following code this morning and it is working perfectly:
Dim r As ADODB.Recordset
Set r = New ADODB.Recordset
r.CursorLocation = adUseClient
r.Fields.Append "IntegerField", adInteger
r.Fields.Append "StringField", adVarChar, 30
r.Fields.Append "DateField", adDate
r.Open
r.AddNew
r.Fields("IntegerField").V alue = 3
r.Fields("StringField").Va lue = "It Works"
r.Update
I am rather new to this so if this questions sounds silly, I apologize <g> I am able to populate the recordset but now I would like to present it to the user. I have tried setting the datasource or recordsource of a datagrid control to "r" but it rejects that. Can someone clear this up for me. I thought r was a recordset object and should be useable
Dim r As ADODB.Recordset
Set r = New ADODB.Recordset
r.CursorLocation = adUseClient
r.Fields.Append "IntegerField", adInteger
r.Fields.Append "StringField", adVarChar, 30
r.Fields.Append "DateField", adDate
r.Open
r.AddNew
r.Fields("IntegerField").V
r.Fields("StringField").Va
r.Update
I am rather new to this so if this questions sounds silly, I apologize <g> I am able to populate the recordset but now I would like to present it to the user. I have tried setting the datasource or recordsource of a datagrid control to "r" but it rejects that. Can someone clear this up for me. I thought r was a recordset object and should be useable
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER