Re: Can and Can't insert using DAO on SQL Server linked table

From: david epsom dot com dot au (david_at_epsomdotcomdotau)
Date: 08/26/03


Date: Tue, 26 Aug 2003 14:53:22 +1000


insert this code:

    Dim daoerr As DAO.Error
    For Each daoerr In DBEngine.Errors
        MsgBox daoerr.Description
    Next daoerr

this will give you a much better idea what is going on.

(david)

"Mark A. Sam" <msam@Plan-It-Earth.Net> wrote in message
news:eFUO0T3aDHA.2336@TK2MSFTNGP09.phx.gbl...
> I am having a problem inserting using DAO, on linked SQL Server tables.
>
> Here is an example:
>
> Dim rst As Recordset
> Set rst = CurrentDb.OpenRecordset("Order Entry ST Materials",
dbOpenDynaset,
> dbSeeChanges)
>
> rst.AddNew
> rst![prodmatType] = "Test"
> rst.Update
> Set rst = Nothing
>
>
> Initially I received an ODBC Call Failed error. Then I set the
permissions
> to this table for the public user to explicitly allow Select, Insert, and
> Update.
>
> This then allowed the update until I closed and retried. This is a test
> procedure. I tried on my working procedure which worked once, then I
> received an error on the next try. Afterwards the test procedure failed
> givng me an error message,
>
> ODBC--insert on a linked table 'Order Entry ST Maetrials' failed.
>
> If seems when I play around with the permissions using Enterprise manager,
> it will allow temporary success.
>
> ADO works fine (or seems to), but but being unfamiliar with it would
> necessitate a big job to change my code to that. I need to work this
issue
> out and any ideas would be appreciated.
>
> I am running Enterprise Edition on my local drive and have all
permissions,
> however, I do not show up on the individual table permissions, only public
> does. I gave Public explicit permissions to Select, Update and Insert.
>
>
> Thanks and God Bless,
>
> Mark A. Sam
>
>



Relevant Pages

  • Re: Can and Cant insert using DAO on SQL Server linked table
    ... This told me that it is trying to insert a duplicate key when I am inserting ... At least I know it isn't a permissions issue. ... > For Each daoerr In DBEngine.Errors ... >> I am running Enterprise Edition on my local drive and have all ...
    (microsoft.public.sqlserver.security)
  • Re: Can and Cant insert using DAO on SQL Server linked table
    ... Take a look at the Primary Key field on the Sql Table. ... intended this field to be an "AutoNumber" type make sure that you set the ... At least I know it isn't a permissions issue. ... >> For Each daoerr In DBEngine.Errors ...
    (microsoft.public.sqlserver.security)

Quantcast