Hi,
I’m having some issues with ODBC in Stata. I have been using it extensively without problem until recently I started having problems loading data. The error appears when I try to load sequentially many datasets. The command I use is:
odbc load in 1/l, table(“`sometable'") conn("DSN=somedsn;UID=someuser;PWD=somepassword") sqlshow noquote
It usually works fine during the loop (the loop is over `sometable’), until I get the error message:
The ODBC driver reported the following diagnostics
[MySQL][ODBC 5.3(a) Driver][mysqld-5.7.21]Fetch without a SELECT
SQLSTATE=24000
I have been trying a whole set of different variants of this command I found online
odbc load in 1/l, exec(`"SELECT * FROM sometable"') clear conn("DSN=somedsn;UID=someuser;PWD=somepassword”)
odbc load in 1/l, exec("SELECT * FROM sometable") clear conn("DSN=somedsn;UID=someuser;PWD=somepassword”)
odbc load in 1/10, exec(`"SELECT * FROM sometable"') clear conn("DSN=somedsn;UID=someuser;PWD=somepassword”)
but nothing seems to work. Any suggestion would be more than appreciated.
Thank you
Best,
Andres
I’m having some issues with ODBC in Stata. I have been using it extensively without problem until recently I started having problems loading data. The error appears when I try to load sequentially many datasets. The command I use is:
odbc load in 1/l, table(“`sometable'") conn("DSN=somedsn;UID=someuser;PWD=somepassword") sqlshow noquote
It usually works fine during the loop (the loop is over `sometable’), until I get the error message:
The ODBC driver reported the following diagnostics
[MySQL][ODBC 5.3(a) Driver][mysqld-5.7.21]Fetch without a SELECT
SQLSTATE=24000
I have been trying a whole set of different variants of this command I found online
odbc load in 1/l, exec(`"SELECT * FROM sometable"') clear conn("DSN=somedsn;UID=someuser;PWD=somepassword”)
odbc load in 1/l, exec("SELECT * FROM sometable") clear conn("DSN=somedsn;UID=someuser;PWD=somepassword”)
odbc load in 1/10, exec(`"SELECT * FROM sometable"') clear conn("DSN=somedsn;UID=someuser;PWD=somepassword”)
but nothing seems to work. Any suggestion would be more than appreciated.
Thank you
Best,
Andres
Comment