freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Bill Kruchas <bill AT kruchas.com>
- To: mailing list freetds <freetds AT lists.ibiblio.org>
- Subject: [freetds] Help accessing sql 2005
- Date: Mon, 12 Jan 2009 09:49:28 -0500 (EST)
Hello
I have just installed freetds and have gotten it to work (somewhat).
to test I selected a record set from northwind on sql 2005 and it worked
fine.
Next I tried to select a record set from a different database and table,
then I got a message about setting autocommit.
so now I set autocommit like this
$dsn = array(
'phptype' => "odbc",
'hostspec' => "sqlserver-ontime",
'username' => "user",
'password' => "pw"
);
$db_attrs = array (
'AutoCommit' => true
);
print( $_POST['us_name'] . ' ' . $_POST['us_pw']);
$db = DB::connect($dsn, $db_attrs);
$db->setFetchMode(DB_FETCHMODE_ASSOC);
$sql = "SELECT userid,loginid,fullname,disable FROM timetrakusers
where loginid = '" .$_POST['us_name']. "' and password = '" .$_POST['us_pw'].
"';";
$result = $db->query($sql);
But I get an error:
An error occurred while trying to run your query.
Error message: DB Error: unknown option AutoCommit
Details: [DB Error: unknown error]
First why does Northwind work without autocommit,
is it because the "recovery method is simple" (no transaction log)?
Second could someone point me to, or share an example of reading and writing
to a mssql 2005?
Thanks In advance
Bill Kruchas
-
[freetds] Help accessing sql 2005,
Bill Kruchas, 01/12/2009
- Re: [freetds] Help accessing sql 2005, Thomas, Christopher (LLU), 01/12/2009
Archive powered by MHonArc 2.6.24.