DSNLess
dim sCon
dim sRec
set sCon = CreateObject("ADODB.Connection")
sCon.Provider = "Microsoft.Jet.OLEDB 4.0"
sCon.connectionString = "DataSourceName = ;UserId = ;Pwd = ;InitialCatalog="
sCon.Open
set sRec = CreateObject("ADODB.Recordset")
sRec.Open "Select * from Table_Name {Conditions}",sCon, adOpenDynamicGet the individual values stored in sRec using a for loop. sRec.fields(0) - would fetch the first value stored in the sRec Object. On Thu, Jul 21, 2011 at 3:12 AM, Kiran Ogeti <[email protected]> wrote: > I am having hard time to connect database .. it gives numerous errors > through the code,, also I tried using connection string wizard on QTP, but > interestingly the text box "Connection string" show blank , does not tell me > what the prob was > > could you suggest connection string with the following info what I have > > Host name > Port > Service > Database > Uid > Pwd > > Thanks > > -- > You received this message because you are subscribed to the Google > "QTP - HP Quick Test Professional - Automated Software Testing" > group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/MercuryQTP?hl=en -- * Thanks & Regards **Thanigai Kumaran* -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en
