freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Michael Peppler <mpeppler AT peppler.org>
- To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
- Subject: Re: Multiples inserts using DB-Lib/MSSQL 7.
- Date: Wed, 1 Dec 1999 16:44:30 -0800 (PST)
Vanderlei Silva writes:
> Hello,
> I'm trying to write a migration app in order to transfer our data from
> mySql to MSSQL 7. Using DB-Lib via freeTDS.
> The following code generates, apparently, good logs in /tmp/freetds.log
> but the true is that only 1 or two rows are really affected in the server.
>
> dbinit();
> login = dblogin();
> DBSETLPWD(login,"xxx");
> DBSETLUSER(login,"xxx");
> DBSETLAPP(login,"sqsh");
> DBSETLHOST(login,"x.x.x.x");
> dbproc = dbopen(login, "IMSSQL");
> dbuse(dbproc, "REGISTRATION");
> .
> .
> .
> while((qrow = mysql_fetch_row(qresult))) {
> if (qrow[0] != NULL) data.memory = atol(qrow[0]);
> if (qrow[1] != NULL) strcpy(data.platform, qrow[1]);
> sprintf(final_sql_cmd, sql_cmd, data.memory, data.platform);
> dbcmd(dbproc, final_sql_cmd);
> dbsqlexec(dbproc);
> }
I guess it's a typo, but... you *do* have a loop on dbresults() in
there too, right?
Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler AT peppler.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list AT isug.com
-
Multiples inserts using DB-Lib/MSSQL 7.,
Vanderlei Silva, 12/01/1999
- <Possible follow-up(s)>
- Re: Multiples inserts using DB-Lib/MSSQL 7., Michael Peppler, 12/01/1999
- Re: Multiples inserts using DB-Lib/MSSQL 7., Vanderlei Silva, 12/02/1999
- Re: Multiples inserts using DB-Lib/MSSQL 7., Brian Bruns, 12/02/1999
- Re: Multiples inserts using DB-Lib/MSSQL 7., Vanderlei Silva, 12/02/1999
Archive powered by MHonArc 2.6.24.