Error 3001: Invalid argument 
Author Message
 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,
Options:=dbDriverNoPrompt)
  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
warning.

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    

  dza.vcf
< 1K Download


Tue, 24 Jul 2001 03:00:00 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. Error 3001 - Invalid argument

2. Please Help...Linking MBD's with code -- ERROR 3001 - Invalid Argument

3. Error 3001, Invalid Argument, Not all the time!

4. ERROR 3001 - "Invalid Argument"

5. OpenRecordset 3001 Invalid Argument error

6. CompactDatabase gives "3001: Invalid Argument"

7. Error 3001 - Arguments are of the wrong type...

8. Filter on Recordset - RT Err '3001' Invalid Argument - Any Ideas?

9. Create local cube, got Error# 3001

10. SQL Server 7.0 -- Error 3001

11. SQL Server 7.0 -- Error 3001

12. ADO Error 3001 Question !!


 
Powered by phpBB® Forum Software