B4J Question Oracle DB connection

stefanogoria

Member
Licensed User
Longtime User
Hi to all, could you please tell me where I can find information to connect to Oracle DB (10g-11g) local network and remote ? I read some ways but I would like to know which is better. I am planning to convert my existing and working package in .net (using ADOdb) to B4J package to have multi platform executable. Thanks
Stefano
 
Many thanks Erel, it's working. I have just seen mkyong website but I can't find the exact .jar
I try with last ojdbc7.jar
With other search I have also find exact parameters for connection.
Here the code working with Oracle 10g XE and Oracle 11g XE (I can't test other).
Thanks a lot
Stefano
Code: Copy
#Region  Project Attributes
    #MainFormWidth: 800
    #MainFormHeight: 400
    #AdditionalJar: ojdbc7.jar ' ....donwload it from oracle website in to your additional library folder
#End Region

Sub Process_Globals
    Private fx ' ..... etc.etc.etc
    Private myConn as SQL ' .... remember to include JSQL library
End Sub

Sup AppStart (Form1 as Forms, Args() as String)
    MainForm = Form1 ' ..... etc.etc.etc
    myConn.Initialize("oracle.jdbc.OracleDriver","jdbc: oracle:thin@hostname:1521:xe",username,password)
   ' where:
   ' hostname is the server name (for local use) or ip address (for remote use)
   ' username and password are credential for the db
End Sub
 
Last edited by a moderator:
Upvote 0
Back
Top