How to connect my VB6 to Access Database? And how to update fields?
I have a problem in updating my textfields in the table I posted in my form. For example for my inventory system, I want the QUANTITY of my products to CHANGE its value everytime SALES are performed. Hope you guys can help. THANK YOU SO MUCH.
Dim gobjConn As ADODB.Connection
Set gobjConn = New ADODB.Connection
gobjConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=" _
& GetAppPath _
& "path and filename.mdb"
Dim rAdd As ADODB.Recordset
Set rAdd = New ADODB.Recordset
rAdd.Open "inventory", gobjConn, adOpenDynamic, adLockPessimistic
now this is how you connect
when connected you search the item which is being sold then you filter that in the database
if new entery then use the following one line
if only updading the existing then dont use rAdd.addnew
Dim lv2Item as string
lv2Item = item number or item code or item name what ever you want
rAdd.Filter = "ID='" & lv2Item & "'"
here ID is name of Field in the table of a database file in ms access you replace it with item code or item name table of the item being sold or what ever you what to do. now that table is parked on the item which info has to be changed
now you read the quinty and then add or subtract and put back the answer in the fiels like this
rAdd!QUANTITY = the answer
Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...