• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

connection without DSN

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Gurus,
I wanna ask is there any means by which we can connect to database without making a DSN... actuallly i am making a application in which we connect to database, and when that application is to be installed on client, i want that client shouldnt make any DSN. so is it possible.. how can we do it!!!
thanks in advance
Harry
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Harry,
Ok this is why they have this FORUM called JDBC. Now you didn't mention what database is this application running on. Let's say its ORACLE8i then the JDBC drivers that come with it are already installed with your ORACLE8i installation
Assuming that you are using Java to develop your application (because this is a java interest site), your code where you connect to the database the connection string will look something like this :

Ok now to explain this .
The String URL is called the connection string and it differs from one database to another because it is made up of four main parts.

    [list]The part before the @ sign tells which type of JDBC driver you're using because i wrote this code for thin clients in mind this is why it is
    you can find out all the different JDBC kinds by reading on oracle.com for example.
    [/list]
  1. the part saying 127.0.0.1 that is where the host where the Oracle server was installed. you can have it any host name ofcourse.
  2. the part with 1521 this is the default port for the oracle server.
  3. the part with LOCAL , that was my Oracle service name , or in other words the SID ( Global Database Name also ) so if you have it any other name here is where to put it.

  4. Hope this helps you out if u need anymore help on that please don't hesitate to contact me directly.

    ------------------
    KaReEm
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hope this helps you out if u need anymore help on that please don't hesitate to contact me directly.


A kind offer but how is that supposed to help anyone else out?
Personally I think it's probably better to continue a thread to completion here...
Dave
reply
    Bookmark Topic Watch Topic
  • New Topic