freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Kenneth Knowles <kknowles AT berkeley.edu>
- To: freetds AT lists.ibiblio.org
- Subject: [freetds] Hello World help
- Date: Tue, 16 Mar 2004 13:27:40 -0800
Hi,
I am interested in binding freetds to ocaml (in fact I've started with dblib)
but I think I am making a fundamental mistake with ct-lib. I have read the
sybase reference for all the commands I use but haven't been able to pinpoint
the error.
I am trying to connect to an MSSQL database. I've successfully executed
equivalent programs in PHP, perl, C-Sharp, and C via dblib, but my ct-lib
hello-world outputs no data (only my debugging output). I know that perl uses
ct-lib and it works, so it is certainly my user error.
Attached are db_ct.c and dblib.c which should be nearly equivalent programs,
except for my debugging output; the dblib.c program works as I expected,
outputting:
$ ./dblib
Column named COLUMN
fdsa
a
d
kalla
marie
maddy
halley
olivia
John
Morris
but db_ct.c outputs the following:
$ ./db_ct
got restype 4040 (we want 4040)
Column named COLUMN
got restype 4040 (we want 4040)
Column named COLUMN
got restype 4040 (we want 4040)
Column named COLUMN
got restype 4040 (we want 4040)
Column named COLUMN
got restype 4040 (we want 4040)
Column named COLUMN
got restype 4040 (we want 4040)
Column named COLUMN
got restype 4040 (we want 4040)
Column named COLUMN
got restype 4040 (we want 4040)
Column named COLUMN
got restype 4040 (we want 4040)
Column named COLUMN
got restype 4040 (we want 4040)
Column named COLUMN
got restype 4046 (we want 4040)
It looks like it gets the right number of rows, but something else goes wrong.
Can anyone help or supply a hello world that I could just fill in the
host/user/password? Is there an example shipped with freetds that I just
haven't found?
Kenn
-
[freetds] Hello World help,
Kenneth Knowles, 03/16/2004
- Re: [freetds] Hello World help, Kenneth Knowles, 03/16/2004
- <Possible follow-up(s)>
-
RE: [freetds] Hello World help,
Thompson, Bill D (London), 03/17/2004
- Re: [freetds] Hello World help, Kenneth Knowles, 03/17/2004
Archive powered by MHonArc 2.6.24.