[Gambas-devel] Change to gb.db.odbc to use ODBC Connection Strings.

Benoît Minisini gambas at ...1...
Thu Aug 27 16:35:23 CEST 2015

Le 27/08/2015 14:54, zxMarce a écrit :
> Benoît,
> It's alive! Mbwehehehe...
> Well, kind of. It does work as intended, but the connection's *.User*
> property must be set to something, even if it is not the real username from
> the connection string. Otherwise, if the *.User* property is not set: Bam!
> *SegFault*.
> This connects OK (using 'Johnny' as user name in the conn string, but not in
> the conn.User property):
> This explodes with SegFault (also using 'Johnny' as user name in the conn
> string):
> So, here's where my C drowns. I do not know the "chain of command" (I mean,
> what is called by who), and thus I have no way of knowing what code needs
> the *.User* property populated.
> I saw several debug blocks like this in the code but I don't know how to
> properly activate them, or where to look for their output once they're
> active:
> Care to throw me a 'pointer' to where I should start?
> I need to know what happens at low level when Gambas runs Connection.Open; I
> mean the whole code and file paths that end in *gb.db.odbc/src/main.c*, so I
> can check every step.
> Also, knowing this, maybe I can make some progress regarding the *RowCount =
> -1* that MSSQL usually returns when running a query that returns a Result.
> zxMarce.

Note that I didn't write the ODBC driver, so I don't know well what the 
SQLxxxx ODBC functions really do.

I noticed that the connection user (desc->user) is directly sent to the 
SQLConnect function. Maybe that function does not like getting a NULL 
pointer there and something must be done in that case.

I suggest that you send your code: it will be easier to help you.


Benoît Minisini

More information about the Devel mailing list