Link to home
Start Free TrialLog in
Avatar of scotts27
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").Value = 3
  r.Fields("StringField").Value = "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
ASKER CERTIFIED SOLUTION
Avatar of samopal
samopal

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of scotts27
scotts27

ASKER

Thanks! I was so close. I did not have it using the set syntax. I was just oing an assignmentt