Make a recordset without a connection 
Author Message
 Make a recordset without a connection

Hi.

Is there a way to make a recordset and fill this with
values without having a connection?

I tried this:
Dim rsttempstk As ADODB.Recordset

Set rsttempstk = New ADODB.Recordset
With rsttempstk
  .Fields.Append "POS", adIUnknown
  .Fields.Append "AANTAL", adIUnknown
  .Fields.Append "CHILD", adIUnknown
  .Supports (adAddNew)
  .Open
  .AddNew
     !Pos = "001"
     !aantal = "1"
     !Child = "123456789"
End With

This gives the error : Multiple-step operation generates
errors:

Geert



Sat, 25 Jun 2005 18:05:07 GMT  
 Make a recordset without a connection
Hi,

Why are you using adIUnknown datatype? adIUnknown is a pointer to interface
of COM objetc and is not what you need in your case. All your steps are
correct except datatype. Specify explicit one, like adVarChar and it should
work fine

.Fields.Append "POS", adIVarChar, 3
......

--
Val Mazur
Microsoft MVP



Quote:
> Hi.

> Is there a way to make a recordset and fill this with
> values without having a connection?

> I tried this:
> Dim rsttempstk As ADODB.Recordset

> Set rsttempstk = New ADODB.Recordset
> With rsttempstk
>   .Fields.Append "POS", adIUnknown
>   .Fields.Append "AANTAL", adIUnknown
>   .Fields.Append "CHILD", adIUnknown
>   .Supports (adAddNew)
>   .Open
>   .AddNew
>      !Pos = "001"
>      !aantal = "1"
>      !Child = "123456789"
> End With

> This gives the error : Multiple-step operation generates
> errors:

> Geert



Sat, 25 Jun 2005 21:26:56 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Using a RecordSet without an ADO connection

2. How to fill a RecordSet without a connection

3. Recordset without connection

4. ADO recordset without connection

5. open recordset, change connection, update recordset?

6. cursor jumps without having made keystroke error

7. Making a PDF without launching Word

8. open form without making application active

9. Making Crystal Reports display memo fields without messing up other parts of the report

10. Making a call by a modem without AT commands

11. Making a picture flash without activating it

12. Making exe- file without problems

 

 
Powered by phpBB® Forum Software