Hi Peter,
Am Freitag, den 30.09.2005, 10:33 +0200 schrieb Peter Eberlein:
> Just a little reminder...
>
> the following snippet doesn't work, are ther any additional driver
> properties required?
> Can somebody with an oracle-connection check this?
>
> mDBProperties(0).Name = "User"
> mDBProperties(0).Value = "Me"
> mDBProperties(1).Name = "Password"
> mDBProperties(1).Value = "secret"
> oDriver = createUNOService("com.sun.star.sdbc.DriverManager")
> sDatabaseURL = "jdbc:oracle:thin:@//IPAddress:1521/DBName"
> oConnect = oDriver.getConnectionWithInfo(sDatabaseURL,mDBProperties())
According to the Developers Guide (I never tried this) you are missing
something:
Read the part "The SDBC Driver for JDBC" in the database chapter and you'll see
that this driver needs another property set:
<snip>
// first create the needed url
String url = "jdbc:mysql://localhost:3306/TestTables";
// second create the necessary properties
com.sun.star.beans.PropertyValue [] props = new
com.sun.star.beans.PropertyValue[] {
new com.sun.star.beans.PropertyValue("user", 0, "test1",
com.sun.star.beans.PropertyState.DIRECT_VALUE),
new com.sun.star.beans.PropertyValue("password", 0, "test1",
com.sun.star.beans.PropertyState.DIRECT_VALUE),
new com.sun.star.beans.PropertyValue("JavaDriverClass", 0,
"org.gjt.mm.mysql.Driver",
com.sun.star.beans.PropertyState.DIRECT_VALUE)
};
// now create a connection to adabas
xConnection = xDriverManager.getConnectionWithInfo(url, props);
</snip>
I think if you fill in the "JavaDriverClass" prop chances are good ...
HTH,
Marc
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]