|
-
Aug 7th, 2000, 06:02 AM
#1
Thread Starter
New Member
Hi there!,
I wonder if anyone could help me! plz.
I have opened up an ADO recordset using an SQL query.
However when I try to change the textfields in anyway i get
the error message
Run-time error '-2147467259(80004005)': Insufficient base table information for updating or refreshing.
Now i know this because of the query, but I also tried updateing the database via another adorecordset. And when i go back 2 the original recordset to move it to the next record i get the same error message.
How do i save 2 the database or make any other changes?.
the sql query i have used is
SELECT Suppliers.ContactName, Suppliers.Address,Suppliers.City,Suppliers.PostalCode,Suppliers.Phone,Suppliers.Fax,Suppliers.Compan yName, Product.ProductName ,Product.Price,Product.[Batch Number] FROM Suppliers INNER JOIN Product ON Suppliers.SupplierID = Product.Supplier;
plz help!
-
Aug 7th, 2000, 09:10 AM
#2
Junior Member
Are you sure you can modify a Joined query? I though that was not possible.
Chicho
-
Aug 7th, 2000, 09:25 AM
#3
Frenzied Member
It isn't possible, with one exception. If the DBMS you use supports views (and Access does not), you can update the information in the view ***as long as*** you do it one table at a time.
-
Aug 7th, 2000, 10:59 PM
#4
Guru
Try using this SQL instead:
SELECT Suppliers.ContactName, Suppliers.Address,Suppliers.City,Suppliers.PostalCode,Suppliers.Phone,Suppliers.Fax,Suppliers.Compan yName, Product.ProductName ,Product.Price,Product.[Batch Number] FROM Suppliers, Product where Suppliers.SupplierID = Product.Supplier;
-
Aug 8th, 2000, 02:31 AM
#5
Addicted Member
i've had the same problem for a program i was writing (and still creating). Do everything in ADO dont try and mix the code up cos its bloody hard to get it right.
this is my code for add a new record just modify it for updating.
(all under a button of course!)
Dim db As Database
Dim RecDB As New ADODB.Recordset
Dim ConnectDB As New ADODB.Connection
ConnectDB.Open ("Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=DATABASENAME.mdb")
RecDB.Open "TABLE NAME", ConnectDB, adOpenKeyset, adLockOptimistic
RecDB.AddNew
RecDB.Fields("Field 1") = textbox1.Text
RecDB.Fields("Field 3") = textbox2.Text
RecDB.Update
RecDB.Close
ConnectDB.Close
end sub
this code works i use all the time for adding and some where i do have the update code but i cant find it at the moment.
ADO good.
DAO bad.
Reality is an illusion caused by by lack of drugs
Is this real or am i just having a dream?
-
Aug 8th, 2000, 11:23 AM
#6
Frenzied Member
Waheed will just need to do it twice because he has _two_ tables.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|