GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Testing  >  DataBase Testing

 Print  |  
Question:  How do you connect to the database from application?



June 06, 2009 09:42:33 #2
 archus   Member Since: June 2009    Total Comments: 1 

RE: How do you connect to the database from application?
 

We can use connection object class to establish connection to the specified
DB during runtime


set ConObj=CreateObject("ADODB.Connection")

ConObj.Open"Provider = Provider Name"


For MS-Access the provider name is

ConObj.Open"Provider = Microsoft.Jet,OLEDB.4.0; dataSource = Path of the
DataBase"


For Oracle SQL Server the Provider name is

ConObj.Open"Provider = sqloledb.1;Server=IP Address;uid=username;pwd=****;DataBase=path
of the database"


For Oracle the Provider Name is

ConObj.Open"Provider = oraoledb.1;Server=****;userid=username(Scott);password=****(tiger)"

     

 

Back To Question