473,406 Members | 2,894 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

DB2 DSN CURRENTSCHEMA

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

Dec 14 '06 #1
0 1115

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John Jenkins | last post by:
Hi, I have a lot of schemas to load into a schema collection. I load them in by reading each one into a XMLTextReader from disk and add them into a schema collection. I have a couple of issues to...
3
by: Hans-Dieter Franz | last post by:
Hello, I have a problem with a Java user-defined stored procedure and the "alter sequence" statement. I use DB2 8.1.2 and had the same problem with 8.1.0, but not with 7.*. I get the following...
0
by: aj | last post by:
DB2 v8 FP5 Red Hat AS/EL 2.1 I am specifying properties for a DB2 Universal JDBC Driver connection in my Java/JDBC app by creating a java.util.Properties object and passing it along in my...
6
by: vijai kumar via DBMonster.com | last post by:
Hi, I am using UDB v 8.1 on win2000. I have setup the ODBC datasources. My application is connecting to the database and performing DML activities. But I am getting the following error ...
2
by: sastry.m.s | last post by:
Hi, I have tables created in my DB2 database created under a schema. Now i want to get connected to these tables with a username different from this schema name from my java application. When...
1
by: Pete Geraghty | last post by:
I want to use DatabaseMetadata to retrieve details of those stored procedures which belong to the current schema. How can I find out what is the current schema for an existing Connection? Or...
7
by: Alan.Squires | last post by:
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...
7
by: natG | last post by:
Using the IBM Universal JDBC (Type 4) driver; Can one specify a default schema as part of the url? Some application servers do not allow sending a default sql command upon connection, so I can't...
2
by: anokun7 | last post by:
Hi, I am connecting to a DB2 v7.1 server from windows using JDBC type 2 (I figured out that type 4 is only for 8 and upwards). I used DB2 Connect to create a system DSN and seem to be able to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.