Hi Paul, Thanks for looking into this. I have unixODBC and FreeTDS installed and I have the configuration file
==> /etc/unixODBC/odbcinst.ini <== [FreeTDS] Description = blah Driver = /usr/lib/libtdsodbc.so Driver64 = Setup = /usr/lib/libtdsS.so Setup64 = UsageCount = 1 CPTimeout = CPReuse = [MSSQL] Description = MS SQL Driver Driver = /usr/lib/libtdsodbc.so FileUsage = 1 ======================================================= I no longer remember where I got the config from, but I am able to use knoda to connect to mssql using these drivers I have tried using both MSSQL and FreeTDS as values of $driver. without success. Daniel On 5/4/07, Harrington, Paul <[EMAIL PROTECTED]> wrote: > It seems that your ODBC driver (as controlled by $driver in your DSN) > eventually ends up eventually calling sp_columns as part of its > implementation of SQLColumns and SQL::Translator is calling column_info > with (undef, undef, undef, undef). I don't recall if I wrote it like > this (I am the original author of the DBI parser). If so, it is very > likely to be a mistake due to my lack of understanding of the DBI > catalog calls and their compatability level with various DBD drivers. > Alternatively, it may have been due to the interface of the parse() call > (if it does not specify a database -- or schema -- to process) > > Which ODBC driver are you using? I assume it is one that is using > sp_columns internally to implement column_info and that it is failing > when presented with the challenge of an unconstrained request. > > > pjjH > > > > > SyntaxSyntax > > sp_columns [ @table_name = ] object [ , [ @table_owner = ] owner ] > [ , [ @table_qualifier = ] qualifier ] > [ , [ @column_name = ] column ] > [ , [ @ODBCVer = ] ODBCVer ] > > ArgumentsArguments > > [ @table_name =] object > > Is the name of the table or view that is used to return catalog > information. object_name is nvarchar(384), with no default. Wildcard > pattern matching is supported. > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Daniel Mahler > Sent: Thursday, May 03, 2007 9:29 PM > To: [email protected] > Subject: Re: [sqlfairy-developers] DBI access error > > It would really help me if someone could give me a hint about this. > I need to generate some code from a schema, > and if I can't get around this I will be writing the code by hand. > > thanks > Daniel > > On 5/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > when running: > > > > > dsn="dbi:ODBC:driver=$driver;Server=$host;Port=$port;database=$name;uid= > $user;pwd=$pass;" > > sqlt -f DBI -t YAML --dsn $dsn --db-user $user --db-password $pass > > > > I get: > > > > setting dbh attribute {FetchHashKeyName} to NAME_uc at > > /home/dm/sqlfairy/lib/SQL/Translator/Parser/DBI/SQLServer.pm line 53. > > setting dbh attribute {ChopBlanks} to 1 at > > /home/dm/sqlfairy/lib/SQL/Translator/Parser/DBI/SQLServer.pm line 58. > > DBD::ODBC::db column_info failed: [unixODBC][FreeTDS][SQL > Server]Procedure > > or function 'sp_columns' expects parameter '@table_name', which was > not > > supplied. (SQL-42000)(DBD: odbc_columns/SQLColumns err=-1) at > > /home/dm/sqlfairy/lib/SQL/Translator/Parser/DBI/SQLServer.pm line 72. > > Error: translate: Error with parser > > 'SQL::Translator::Parser::DBI':DBD::ODBC::db column_info failed: > > [unixODBC][FreeTDS][SQLServer]Procedure or function 'sp_columns' > expects > > parameter '@table_name', which was not supplied. (SQL-42000)(DBD: > > odbc_columns/SQLColumns err=-1) at > > /home/dm/sqlfairy/lib/SQL/Translator/Parser/DBI/SQLServer.pm line 72. > > > > > > > > thanks > > Daniel > > > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > -- > sqlfairy-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ -- sqlfairy-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers
