Error WINOLE/1007 Argument error: OPEN (DOS Error -2147352567)

1,258 views
Skip to first unread message

José M. C. Quintas

unread,
Dec 6, 2011, 9:01:03 PM12/6/11
to harbou...@googlegroups.com
Using ADO and OLEDB and MySql, this error occurs several times.
What I can do to minimize errors, and prevent routine to stop?
 
Possible causes are:
- ADSL Quality
- Windows limits for half-open connections and dead connections
 
What changes I made:
- Reduce limit to dead connections (from MySql suggestions)
- Increase time-out limits
 
I am using Windows 7 Professional, and server have Linux in an internet location.
 
My use is like this:
 
Do While .t.
   cnMySql := ConexaoMySql()
   cnMySql:Open() // -------------------- Error occurs here
   cSql = “SELECT * FROM JPNFEXML WHERE NECHAVE=’35111111111111111111111’”
   rsMySql := cnMySql:Execute(cSql)
   Do While .Not. rsMySql:Eof()
         rsMySql:MoveNext()
   Enddo
   rsMySql:Close()
   rsMySql := NIL
   cnMySql:Close()
   cnMySql := NIL
   Inkey(120)
Enddo
 
Function ConexaoMySql()
Local cnMySql
cnMySql := win_OleCreateObject(“ADODB.Connection”)
cnMySql:ConnectionString := “Driver={MySQL ODBC 3.51 Driver};Server=xxx;Option=131072;Stmt=;Database=xxx;User ID=xxx;Password=xxx;”
cnMySql:CursorLocation = 3
cnMySql:CommandTimeOut = 30
cnMySql:ConnectionTimeOut = 30
Return cnMySql
 
 
José M. C. Quintas

dordije

unread,
Nov 28, 2016, 1:33:18 PM11/28/16
to Harbour Users

These days, while creating Excel table, I got similar error:
Error WINOLE/1007 Argument error: SAVEAS (DOS Error -2147352567)
In my prg  I created Excel table, and tried to save it without user intervention.
When I write  oExcel:ActiveWorkbook:SaveAs('filename.xls'), it works OK.
When I write  oExcel:ActiveWorkbook:SaveAs('\foldername\filename.xls'), it produces upper error !
When I write  oExcel:ActiveWorkbook:SaveAs('X:\foldername\filename.xls'), it works OK (X is drive letter) !!

Hope this helps someone.

Regards.




Reply all
Reply to author
Forward
0 new messages