PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Lee Wenzler" <Lee dot Wenzler at Roanoke dot com>
Subject: Sybperl to MS SQL Server help
Date: Jul 2 2002 7:53PM

Dang, this is way too hard. This all started when I tried to connect to
a MS SQL server using Sybperl. I can get the FreeTDS stuff to work as
far as the make check passing the login & logout, & change db tests, but
I'm lost after that. After not getting that to work, I tried to get
unixODBC drivers to work. I've gone thru all the FAQs and keep getting
deeper and deeper into this hole. Am I making this more complicated than
it needs to be (please say yes)??

I'm getting this error:

DBI->connect(JOBS) failed: [iODBC][Driver Manager]Driver does not
support this function (SQL-IM001)(DBD: db_login/SQLConnect err=-1) at
./jobs.pl line 723


When I try this code:

	use DBI;

	my ($srvr, $db, $usr, $pwd) = @ARGV;
	my %attr = (RaiseError => 1, AutoCommit => 0);

	# Connect to the server:
	my $dbh = DBI->connect("DBI:ODBC:$srvr", $usr, $pwd, \%attr)
	    or die DBI->errstr;


	# Use the given database:
	$dbh->do("use $db") or die $dbh->errstr;

	# Create a temp table and insert into it:
	$dbh->do('CREATE TABLE #foo (id INT PRIMARY KEY, val CHAR(4))')
   	 or die $dbh->errstr;
	$dbh->do("INSERT INTO #foo (id, val) VALUES (1, 'foo')")
   	 or die DBI->errstr;

	$dbh->disconnect;


So then I thought I needed to set up the unixODBC stuff:


Here's the errors I'm getting when trying to compile unixODBC-2.2.1. 


/usr/ccs/bin/ld -G -h libodbctxt.so.1 -o .libs/libodbctxt.so.1.0.0
SQLAllocConnect.lo SQLAllocEnv.lo SQLAllocHandle.lo SQLAllocStmt.lo
SQLBindCol.lo SQLBindParameter.lo SQLBrowseConnect.lo
SQLBulkOperations.lo SQLCancel.lo SQLCloseCursor.lo SQLColAttribute.lo
SQLColAttributes.lo SQLColumnPrivileges.lo SQLColumns.lo SQLConnect.lo
SQLCopyDesc.lo SQLDescribeCol.lo SQLDescribeParam.lo SQLDisconnect.lo
SQLDriverConnect.lo SQLEndTran.lo SQLError.lo SQLExecDirect.lo
SQLExecute.lo SQLExtendedFetch.lo SQLFetch.lo SQLFetchScroll.lo
SQLForeignKeys.lo SQLFreeConnect.lo SQLFreeEnv.lo SQLFreeHandle.lo
SQLFreeStmt.lo SQLGetConnectAttr.lo SQLGetConnectOption.lo
SQLGetCursorName.lo SQLGetData.lo SQLGetDescField.lo SQLGetDescRec.lo
SQLGetDiagField.lo SQLGetDiagRec.lo SQLGetEnvAttr.lo SQLGetFunctions.lo
SQLGetInfo.lo SQLGetStmtAttr.lo SQLGetStmtOption.lo SQLGetTypeInfo.lo
SQLMoreResults.lo SQLNativeSql.lo SQLNumParams.lo SQLNumResultCols.lo
SQLParamData.lo SQLParamOptions.lo SQLPrepare.lo SQLPrimaryKeys.lo
SQLProcedureColumns.lo SQLProcedures.lo SQLPutData.lo SQLRowCount.lo
SQLSetConnectOption.lo SQLSetCursorName.lo SQLSetDescField.lo
SQLSetDescRec.lo SQLSetEnvAttr.lo SQLSetParam.lo SQLSetPos.lo
SQLSetScrollOptions.lo SQLSetStmtAttr.lo SQLSetStmtOption.lo
SQLSpecialColumns.lo SQLStatistics.lo SQLTablePrivileges.lo SQLTables.lo
SQLTransact.lo IO.lo IOText.lo driverextras.lo SQLDriverLoad.lo
SQLDriverUnload.lo -z allextract ../../log/.libs/libloglc.al
../../ini/.libs/libinilc.al ../../lst/.libs/liblstlc.al
../../sqp/.libs/libsqplc.al ../../odbcinst/.libs/libodbcinstlc.al
../../libltdl/.libs/libltdlc.al -z defaultextract
../../log/.libs/libloglc.al ../../ini/.libs/libinilc.al
../../lst/.libs/liblstlc.al ../../sqp/.libs/libsqplc.al -lfl
../../odbcinst/.libs/libodbcinstlc.al ../../libltdl/.libs/libltdlc.al
-ldl -lm -lthread       -lc 
ld: fatal: library -lfl: not found
ld: fatal: File processing errors. No output written to
.libs/libodbctxt.so.1.0.0
gmake[3]: *** [libodbctxt.la] Error 1
gmake[3]: Leaving directory
`/export/home/leew/unixODBC-2.2.1/Drivers/txt'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory
`/export/home/leew/unixODBC-2.2.1/Drivers/txt'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/export/home/leew/unixODBC-2.2.1/Drivers'
gmake: *** [all-recursive] Error 1




Thanks,

Lee Wenzler
Publishing Systems Mgr.
The Roanoke Times