ODBC Machine DSN
Posted: Tue Apr 15, 2014 11:18 am
I wanted to be sure I understand the ODBC teminology. The manual says use
wfopen(type="ODBC") if for DSN Source
and wfopen(type="DSN") is for DSN file
I assume DSN Source is what Microsoft calls a User DSN and others call a Machine DSN and it is used without quotes
wfopen(type="ODBC") MyODBC "select * from table1;"
I seem to be able to substitute a File DSN here
wfopen(type="ODBC") "C:\FileDSN.dsn" "select * from table1 where year(date) >= 2010;"
or use
wfopen(type="DSN") "C:\FileDSN.dsn" "select * from table1 where year(date) >= 2010;"
but type="DSN" will not read a Machine DSN (without quotes)
Is this right?
I mainly ask because I am trying to use the same basic syntax with import to bring date via ODBC into an existing workfile
and had some unexpected results and I was not sure if it was from how dates were lining up or the ODBC vs DSN syntax was creating a problem.
wfopen(type="ODBC") if for DSN Source
and wfopen(type="DSN") is for DSN file
I assume DSN Source is what Microsoft calls a User DSN and others call a Machine DSN and it is used without quotes
wfopen(type="ODBC") MyODBC "select * from table1;"
I seem to be able to substitute a File DSN here
wfopen(type="ODBC") "C:\FileDSN.dsn" "select * from table1 where year(date) >= 2010;"
or use
wfopen(type="DSN") "C:\FileDSN.dsn" "select * from table1 where year(date) >= 2010;"
but type="DSN" will not read a Machine DSN (without quotes)
Is this right?
I mainly ask because I am trying to use the same basic syntax with import to bring date via ODBC into an existing workfile
and had some unexpected results and I was not sure if it was from how dates were lining up or the ODBC vs DSN syntax was creating a problem.