problem with adodc and .......

hi friends, i have 2 problems

1) the code >>adoSales_Item.recordset.addnew<< gives me an error message "Object variable or with block variable not set". What do i do? Please help.

2) on my form there is a label with a price as caption due to some calculation. how can i update a field 'Balance' in the table tblCustomer for a particular CustomerID in the table as follows: Balance should = Balance + label.caption.
the customerID is displayed in a textbox.

I have tried everything i could but it didn't work, so friends please help.
Thanks.




Comments

  • : hi friends, i have 2 problems
    :
    : 1) the code >>adoSales_Item.recordset.addnew<< gives me an error message "Object variable or with block variable not set". What do i do? Please help.

    You have to initialize the .Recordset property to an instance of an ADODB.Recordset before you call it's methods.

    Set adoSales_Item.Recordset = New ADODB.Recordset

    Of course, doing that will give you an empty recordset with no fields - you'd have to add the fields yourself and then do .AddNew to add records. The typical course of action is to do a database query and then assign *that* result set to the .Recordset property so you've got records and columns initialized for you.



    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion