multiple ado objects 
Author Message
 multiple ado objects

Hi again...

I got everything I needed settled earlier.  Thanks again to all that helped.
New issue.  I have to update 2 different tables from this one point.  2 of
the fields in my first table cary over into the 2nd table.  So I added a 2nd
ado to my form, and coded as below.  I know the code is for s**t, but this
is just for a quick demo.

The problem when it gets to the adodc2 code, I get an object variable or
with block variable not set.  I looked it up, but as usual the MS help files
are somewhat cryptic...

any thoughts?  Thanks,

Dean M

PS here's the code I used...

    Adodc1.Recordset.AddNew
    Adodc1.Recordset.Fields("fname") = txtFname.Text
    Adodc1.Recordset.Fields("lname") = txtLname.Text
    Adodc1.Recordset.Fields("email") = txtEmailaddy.Text
    Adodc1.Recordset.Fields("phone") = txtPhonenumber.Text
    Adodc1.Recordset.Fields("imagelocation") = fileloc
    Adodc1.Recordset.Fields("customerid") = txtBarcode.Text
    Adodc1.Recordset.Fields("newimgloc") = newimage
    Adodc1.Recordset.Update
    Adodc1.Recordset.Close

    Adodc2.Recordset.AddNew
    Adodc2.Recordset.Fields("customerid") = txtBarcode.Text
    Adodc2.Recordset.Fields("imglocation") = newimage
    Adodc2.Recordset.Update
    Adodc2.Recordset.Close



Mon, 06 Sep 2004 21:16:07 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ADO Command Object using Multiple Connection Objects

2. Multiple timers/objects, multiple threads

3. Multiple Forms Question: Object reference not set to an instance of an object

4. ADO Control OR ADO object?

5. ADO data control 6.0 and ADO data object 2.1 conflict

6. use ado control, ado object or data environment?

7. ADO ADO ADO ADO ADO VB examples / samples book wanted

8. Populating multiple dropdown from an ADO database connection

9. Batch update for multiple tables using single ADO Recordset (VB )

10. ADO SHAPE w/ multiple child relationships

11. Multiple recordsets for a single ADO connection???

12. Using ADO in VB6 to connect to multiple databases

 

 
Powered by phpBB® Forum Software