[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
eXept User Forum • View topic - SQLServer
Questions about usage of the system and tools

SQLServer

Postby JayBee » 15. Feb 2009, 21:30

Hi,

Has anyone been able to access a SQLServer database from STX?
Either by ODBC or in another way?
If so, please give an example of how this is done.

Regards,

Jan
JayBee
 
Posts: 6
Joined: 13. Dec 2008, 23:08

Re: SQLServer

Postby cgittinger » 29. Apr 2009, 22:10

cgittinger
 
Posts: 61
Joined: 12. Nov 2008, 17:05

Re: SQLServer

Postby JayBee » 9. May 2009, 18:19

When I create an ODBC definition in windows and then evaluate the following code:

| session |
session := SQL::ODBCSession new.
session connectWithUsername:'blabla' password: 'blablaToo' dbname: 'TestDB'.
session disconnect

it ends with an exception:

[Microsoft][ODBC SQL Server Driver][SQL Server]Changed language setting to us_english.

When I change the default language of the ODBC connection into Dutch, the message changes to:

[Microsoft][ODBC SQL Server Driver][SQL Server]Changed language setting to nederlands

This should not be handled as an exception, but as a normal message.
JayBee
 
Posts: 6
Joined: 13. Dec 2008, 23:08

Re: SQLServer

Postby mbeyl » 12. May 2009, 17:13

Hello,
here is a patch for the ODBCSession class.
File in the ".chg" file.
When connecting, "success with info" is now handled in the right way.

The problem is solved in newer versions starting with 5.4.5.

Regards,

Michael
Attachments
ODBCSessionPatch.chg
(623 Bytes) Downloaded 616 times
mbeyl
 
Posts: 3
Joined: 19. Dec 2008, 15:15

Re: SQLServer

Postby duetto » 13. Feb 2010, 01:03

hi all,

this is related to this thread.

my question is, where does the selecting the correct odbc driver happen (i.e. what class)?

i'm trying to connect to an odbc datasource with no success. i have successfully connected to the datasource with other tools.

john cummings
duetto
 
Posts: 22
Joined: 28. Sep 2009, 02:43

Re: SQLServer

Postby JayBee » 27. Feb 2010, 16:31

Hi John,

I would expect the ODBCSession.
What error do you get when connecting to the ODBC datasource?

Best regards,

Jan
JayBee
 
Posts: 6
Joined: 13. Dec 2008, 23:08

Re: SQLServer

Postby duetto » 3. Mar 2010, 15:43

hi jan,

thanks for getting back to me.

first let me point out that the datasource is a sqlite database.

the bottomline is that it's failing in new. the environment handle is nil.

here is the code.

john

***********************

|session|

session := SQL::ODBCSession new. <====== failing here environmentHandle is nil
session initializeDatabaseHandle.
session connectWithUsername:'' password:'' dbname:'stxtestdb'. "odbc user dsn"
Transcript showCR:'Connected'.
session disconnect.
Transcript showCR:'Disconnected'.
duetto
 
Posts: 22
Joined: 28. Sep 2009, 02:43

Re: SQLServer

Postby JayBee » 14. Mar 2010, 12:35

John,

I assume you are running STX under some Windows version (XP, Vista, Server ...) and have defined an ODBC datasource.
Can you communicate with the database e.g. from Excel?

Jan
JayBee
 
Posts: 6
Joined: 13. Dec 2008, 23:08

Re: SQLServer

Postby duetto » 14. Mar 2010, 14:31

hi jan,

yes, i am able to access table structure and data using 2 other tools that i have.

i still don't understand where STX learns about "DSN=...." or "DRIVER=...".

also, why does the odbc session have a nil handle returned from new?

i guess these are more rhetorical questions.

anyway, thanks for your help.

john
duetto
 
Posts: 22
Joined: 28. Sep 2009, 02:43

Re: SQLServer

Postby JayBee » 19. Mar 2010, 23:03

JayBee
 
Posts: 6
Joined: 13. Dec 2008, 23:08

Next

Return to General Help

Users browsing this forum: No registered users and 1 guest

Design by GB