Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / January 2007

Tip: Looking for answers? Try searching our database.

System DSN

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan.Squires@gmail.com - 15 Dec 2006 12:27 GMT
Hi,

I need to create a DB2 system DSN programmatically. I need to set the
currentschema parameter to be equal to the appropriate database name. I
am able to create the DSN ok, but am unable to add the currentschema
parameter. I am using visual fox pro 9. My code follows:

       lc_driver = "IBM DB2 ODBC DRIVER" + CHR(0)

       lc_dsn = "DESCRIPTION=Connection Description" + CHR(0)+ ;
       DSN=TEST" + CHR(0)+ ;
       "DBALIAS=" + ALLTRIM(UPPER(lc_DBAlias)) + CHR(0)+ ;
       "CURRENTSCHEMA=" + ALLTRIM(UPPER(lcDatabase)) +  CHR(0)+ ;
       "UID=" + ALLTRIM(lc_AdminUser) + CHR(0)+ ;
       "PWD=" + ALLTRIM(lc_AdminPassword) + CHR(0)

       fResult = SQLConfigDataSource(0, 4, @lc_driver, @lc_dsn)

I don't get any error message and the DSN is created, but withou the
currentschema.
Any help would be appreciated.

Alan
Brian Tkatch - 15 Dec 2006 15:46 GMT
> Hi,
>
[quoted text clipped - 19 lines]
>
> Alan

I don't know if you can set that parameter, hoipefully someone else
will respond. I'd just like to note that the SCHEMA can be SET after
the CONNECT by passing the statement: SET SCHEMA <schema>;.

B.
Brian Tkatch - 15 Dec 2006 17:03 GMT
> Hi,
>
[quoted text clipped - 19 lines]
>
> Alan

I don't know if you can set that parameter, hoipefully someone else
will respond. I'd just like to note that the SCHEMA can be SET after
the CONNECT by passing the statement: SET SCHEMA <schema>;.

B.
Brian Tkatch - 15 Dec 2006 17:04 GMT
> Hi,
>
[quoted text clipped - 19 lines]
>
> Alan

I don't know if you can set that parameter, hoipefully someone else
will respond. I'd just like to note that the SCHEMA can be SET after
the CONNECT by passing the statement: SET SCHEMA <schema>;.

B.
Brian Tkatch - 15 Dec 2006 17:05 GMT
> Hi,
>
[quoted text clipped - 19 lines]
>
> Alan

I don't know if you can set that parameter, hoipefully someone else
will respond. I'd just like to note that the SCHEMA can be SET after
the CONNECT by passing the statement: SET SCHEMA <schema>;.

B.
Brian Tkatch - 15 Dec 2006 17:06 GMT
> Hi,
>
[quoted text clipped - 19 lines]
>
> Alan

I don't know if you can set that parameter, hoipefully someone else
will respond. I'd just like to note that the SCHEMA can be SET after
the CONNECT by passing the statement: SET SCHEMA <schema>;.

B.
Brian Tkatch - 15 Dec 2006 17:16 GMT
> Hi,
>
[quoted text clipped - 19 lines]
>
> Alan

I don't know if you can set that parameter, hoipefully someone else
will respond. I'd just like to note that the SCHEMA can be SET after
the CONNECT by passing the statement: SET SCHEMA <schema>;.

B.
senthil - 31 Jan 2007 01:30 GMT
> Hi,
>
[quoted text clipped - 19 lines]
>
> Alan

Hi Alan,
              I need a help from you. I need to create System DSN for
DB2 database.
I have installed DB2 8.6 with Fixpack6.

I am passing everything correctly. But it fails at SQLConfigDataSource
function.

I would like to know which version of DB2 you used.

FYI:
I am able to create System DSN through Control Panel.

I am able to create System DSN for DB2 version9.0 through Control
Panel as well as through Program.

But i am not able to create one for DB2 version 8.2 programatically.

Thanks
Senthil
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.