Hello everybody,
here is a strange thing that creates me nightmares ...
How-To-Repeat:
Stage 1 . Using a my SQL GUI :
Create a simple Table ...
create table FAKE (bidon integer)
Everything works fine ...
Stage 2. Using a C compiler and MyODBC3.51 Driver (actually I use Borland as
C Compiler)
h_hndl hconn,hstmt,henv ;
SQLRETURN res = SQL_ERROR ;
res = SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&henv) ;
if (res != SQL_SUCCESS) return
FALSE ;
res =
SQLSetEnvAttr(henv,SQL_ATTR_ODBC_VERSION,(SQLPOINTER)SQL_OV_ODBC3,SQL_IS_INT
EGER) ;
if (res != SQL_SUCCESS) return
FALSE ;
res = SQLAllocHandle(SQL_HANDLE_DBC, henv,&hconn) ;
if (res != SQL_SUCCESS) return
FALSE ;
res = SQLConnect(hconn, "DSNName",... ,'UserName',
"Password...', ..) ;
if (res != SQL_SUCCESS) return FALSE ;
res = SQLAllocHandle(SQL_HANDLE_STMT,hconn,&hstmt);
if (res != SQL_SUCCESS) return FALSE ;
res = SQLColumns(hstmt,
NULL, 0, // All catalogs
NULL, 0, // All schemas
(unsigned char*) "FAKE", SQL_NTS, // CUSTOMERS table
NULL, 0); // All columns
res = SQLFreeHandle (SQL_HANDLE_STMT,hstmt);
if (res != SQL_SUCCESS) return FALSE ;
res = SQLDisconnect (hconn);
if (res != SQL_SUCCESS) return FALSE ;
res = SQLFreeHandle (SQL_HANDLE_DBC,hconn);
if (res != SQL_SUCCESS) return FALSE ;
res = SQLFreeHandle (SQL_HANDLE_ENV,henv);
if (res != SQL_SUCCESS) return FALSE ;
Everything successes in this code , always SQL Success is returned
( note: I removed the lines that use the result set of SQLColumns.. because
of no interest ..)
Stage 3. Using the GUY , try to erase the table ...
DROP table FAKE
Message : Error on delete of '.\LemoineDB\fake.MYI' (Errcode: 13) (I think
this is an permission problem)
I am almost sure I habe all the permissionss :
I cannot succeed in deleting the table until I stop the server and restart
it .
Once the server is restarted I can drop the table using the command above
with no problem .
Other test I did : If I comment out the SQLColumns API , everything works
fines from stage 1 to 3 .
Fix:
I have to restart the server to drop the tables ..(that not a fix ) :--)))
See also information below and joined the MyODBC.log I created running the
code .
Please , give me a quick answer even if no quick solution .
Thank you .
Best Regards, Fabrice Schleifer ..
Synopsis: <synopsis of the problem (one line)>
Submitter-Id: <submitter ID>
Originator: <your name>
Organization: <your organization>
MySQL support: [none | licence | email support | extended email support ]
Severity: [non-critical | serious | critical ]
Priority: [low | medium | high ]
Category: [mysqld, mysql client, C, PHP, PERL, ...]
Class: [ sw-bug | doc-bug | change-request | support ]
Release: mysql-3.23.38
Exectutable: [mysqld-nt]
Environment: <Pentium 4 1.5 Ghz 512 Mo>
System: <Win2000>
Compiler: VC++ 6.0
Architecture: i
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php