Jump to content

msAccess Error Opening Up some records


Recommended Posts

Okay i've tested this every possible way i could think.

I'm new to msaccess so hopefully someone with more experience can catch my flaw.

side note: the database was made by my friend

I was able to add records to different tables in the database using the following code:

but for the table dba-inventory I received an error saying:

.Open ("SELECT * FROM " & $adTable , $oADO, $adOpenStatic, $adLockOptimistic)^ ERROR

So i tried to duplicate the table in every way possible and I was able to edit the "duplicate."

Can anyone please help me? Thank you in advance.

#include <Access.au3>
   $adSource = "C:\Scripts\DbAs.accdb"
   $adTable = "dba-inventory"
   $adCol="Owner"
   $adQuery="test"
   $adcCol="Owner"
   $adData="2000|1|the name of the item12|description nana"
$maxid=_accessMaxID($adSource, $adTable)
ConsoleWrite($maxid)
_accessAddRecord($adSource, $adTable, $adData)
Link to comment
Share on other sites

ok i added a error handler .. and this is what i got

We intercepted a COM Error!!

err.description is: Syntax error in FROM clause.

err.windescription is:

err.lastdllerror is: 0

err.scriptline is: 87

err.number is: 80020009

err.source is: Microsoft Office Access Database Engine

err.helpfile is:

err.helpcontext is: 5003131

We intercepted a COM Error!!

err.description is: Operation is not allowed when the object is closed.

err.windescription is:

err.lastdllerror is: 0

err.scriptline is: 88

err.number is: 80020009

err.source is: ADODB.Recordset

err.helpfile is: C:WindowsHELPADO270.CHM

err.helpcontext is: 1240653

Link to comment
Share on other sites

ok here's another finding .. when i rename the table... i can edit it as well... does that reset relationships? i read something about being connected to queries might not let you select the table?

does that ring any bells? because when you rename the table.. the queries doesn't redirect to the new table name.

changing the name also reset the relationship of that table.. I'm thinking it has to be with the relationship to other tables..

does anyone know how relationship within a table affect if we can SELECT a table or not? or is there a different approach to how we can open the database?

Edited by tn04462
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...