473,394 Members | 2,168 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,394 software developers and data experts.

How to obtain the schema from a JDBC Connection ?

Hi all,

Does anyone know how to get the schema name given a JDBC Connection
object? I see that I can do "toString" and pick the "User=" substring,
but smells of a hack. :)

Thanks,

Alejandrina

Mar 31 '06 #1
2 2023
apattin wrote:
Hi all,

Does anyone know how to get the schema name given a JDBC Connection
object? I see that I can do "toString" and pick the "User=" substring,
but smells of a hack. :)


Query the CURRENT SCHEMA special register.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Apr 3 '06 #2
Thanks! I can do that.

Alejandrina

Apr 3 '06 #3

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

Similar topics

0
by: JShurmatz | last post by:
If anyone can shed some light on this problem I would greatly appreciate it. I am unsuccessfully trying to use a database connnection retrieved from a pool configured using Java System Web...
0
by: Nils Valentin | last post by:
Hi MySQL Fans ;-), Is it possible that the 3.08 series allows to connect to 4.0.14 versions but not to the 4.1 alpha-versions ? I get belows error when tryig to connect from DbVisualizer which...
0
by: Robert Mazur | last post by:
MySQL 5.0 alpha (binary install) on Solaris 9 -or- RedHat 8.0 mysql-connector-java-3.0.8-stable ----------------------- Is there something different going on with JDBC and the alpha version...
1
by: aj | last post by:
DB2 v8 FP5 Red Hat AS 2.1 We are encountering a strange error where the default schema name that is specified w/ a SET SCHEMA command is being inconsistently ignored, causing all table...
5
by: Steffen | last post by:
hi there, i have a problem connecting to a db2 database 7.2.4 on AIX using java when running the javacode on AIX using jdk1.3.1. The classpath is correctly set to java12/... on windows the...
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...
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...
5
oll3i
by: oll3i | last post by:
my librarybean package library.ejb; import java.sql.*; import javax.ejb.*; import library.common.*; @Stateless @Remote
2
by: bevis | last post by:
I'm new to sql server and mysql but this seems like it should be a pretty straight forward jdbc connection. But I have spent almost 2 days just trying to get a jdbc connection. Please help if you...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.