RE: Create new DB using JAVA

"Dittmar, Daniel" <[email protected]>
Newsgroups gmane.comp.db.sapdb.general
Message-ID <[email protected]>
>    DBM dbSession = DBM.dbDBM ("localhost", "my_new_db");
>    DBM.dbrootDBM("localhost", "c:\program files\sapdb\depend");
>    result = session.cmd ("db_create");

Use the following instead:
// DBM.dbDBM works only for an existing database
// make sure that backslashes are properly escaped
DBM dbSession = DBM.dbrootDBM("localhost", "c:\\program files\\sapdb\\depend");
result = session.cmd ("db_create my_new_db dbm,dbm windowsuser,windowspassword);
// my_new_db is the name of the new database
// dbm,dbm is username and password of the dbm user
// windowsuser,windowspassword is username and password of your Windows user
// this is necessary bcause the Java interface connects through TCP/IP and
// thus appears like a remote user

Daniel Dittmar

-- 
Daniel Dittmar
SAP DB, SAP Labs Berlin
[email protected]
http://www.sapdb.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.