Invalid argument!

Invalid argument!

Post by G La » Sun, 13 Oct 2002 13:31:51

I used to use ODBC to get data from tables in a Btrive engine database to
Access2K. I worked fine until yesterday. I used Get External Data->Import to
get data. Yesterday, in the middle of getting data, a message "Invalid
Argument" popped up and the process stopped. I tried again and again, only
to see the same message. Worst of all, I now could not get to any table in
that database. Every time I tried, this error message would pop up
Any suggestion?

1. Error 3001: Invalid argument

Im writing an application for use in conjunction with Word 8.0b. The
application will execute different SQL/DML statements on several
different tables. When I execute the following VB-code:

  Set ws = CreateWorkspace(dbName, uid, passwd, dbUseODBC)
  Set conn = ws.OpenConnection(name:=dbName, Connect:=strConn,
  sqlStr = "DELETE FROM documents WHERE regno = 'P4461-9'"
  conn.Execute sqlStr, dbExecDirect + dbFailOnError

I run into the VB error handler which tells me "Error 3001: Invalid
argument". Of course, no on-line help is avaliable for this error
section. I have looked at the Microsoft KB, where I can find an
explanation, but that explanation is irrelevant. It only says that this
error will occur if I mix the execute options in an inconsistent way. I
have tried to remove as well the "dbExecDirect" as the "dbFailOnError"
and even both, but with the same result.

I have tried the ODBC connection both as "sa" and the account-ID for my
application, but none of them works. The DB tables have the correct
permissions. Executing other DML statements from the application on
other, similar tables works fine. Running exactly the same SQL statement
on the enterprise manager SQL causes no problem either

As a matter of fact the above code is a fragment of a composite of SQL
transactions, wich starts with a delete on certain FK hits then followed
by inserts. Therefore I want to encapsulate the transactions between
"ws.BeginTrans"and "ws.CommitTrans" with "ws.Rollback" in the execption
block. But when I try THAT, I get thrown out from the MS Word session.
No DR Watson, no VB error message, just a stiff "Exit 0" without any

Can anyone help me?
Daniel Zagar/Information Systems Developer
Cresita Engineering AB
Box 22226
SE-250 24  Helsingborg, Sweden
Phone: +46-42-25 32 31  Fax: +46-42-25 32 99    

< 1K Download

2. ADO & RDO with WinXP

3. Invalid argument to time encode in merge replication

4. Procedure changing NT Servername with SQL7 without installing setup

5. Need help on Invalid Argument

6. PICK/Unidata/UniVerse Contract Programmers needed

7. IpcMemoryCreate: shmget failed (Invalid argument)

8. connecting LINUX-IDS with Windows

9. PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid argument

10. IpcSemaphoreKill: ...) failed: Invalid argument

11. Error 3001 - Invalid argument

12. Invalid Argument