How do you create a recordset object in VBScript?

Answer Posted / prasant

set oRecordset = New ADODB.Recordset -- for VB scripting
set oRecordset = createobject("ADODB.Recordset") -- for QTP scripting

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How should i Create Email invite with server-side Coding?

1600


what types of bugs will we find out in banking projects for automation testing?

1764


Capture the Unique label changes on google home page for I am feeling lucky button and save those label changes to Notepad Note: Using QTP

1874


why do u choose to go for testing why cant for devoloping

1588


Which object is used to work with the database in the vbscript language and what statement is used to create this object?

506






How can you create a file object to work with the files in the vbscript language?

506


Which operator can be used to check if two numbers are equal or not in vbscript?

651


What is the use of the ‘open’ method to work with the database in the vbscript language and what connection string is passed in the same and what is its usage?

487


Why to use option explicit in vb script?

597


What are keywords in the vbscript language?

524


Sub link() Dim k As Integer Dim rand As Integer Dim URL As String Dim foldernum As Integer Dim folderstring As String Dim filenum As Integer Dim filestring As String k = 1 'for AC Numbers For i = 11 To 40 foldernum = 0 foldernum = 1000 + i folderstring = CStr(foldernum) folderstring = Mid(folderstring, 2, 3) folder = "ac" & folderstring 'folderstring = Sheets(2).Cells(i, 1) ' for Number of Random files For j = 1 To 10 rand = Int(Rnd * (200 - 1) + 1) filenum = 0 filenum = 1000 + rand filestring = CStr(filenum) filestring = Mid(filestring, 2, 3) 'URL = "http://ceobihar.nic.in/PSCDROM/ac" & folderstring & "/i" & folderstring & "0" & filestring & ".pdf" URL = "http://www.elections.tn.gov.in/pdfs/dt1/" & folder & "/" & folder & filestring & ".pdf" ' URL =http://www.wb.nic.in/wbeco/EROLLS/PDF/English/A001/a0010105 .pdf Cells(k, 1) = folderstring Cells(k, 2) = folder Cells(k, 3) = filestring Cells(k, 3) = URL k = k + 1 Next j Next i End Sub plz define it

2238


Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?

576


I have an excel sheet with multiple ID's in a column. Now i need fetch those ID's in an application and check whether if it already exist in the DB. If not then i have to go with the process of inserting them in the DB. If it exists then i need to skip that ID and move to the next ID and check the same and proceed. How can i do that with for loop and if condition?

862


How to open a file. What is the perpose of true and false mode there?

607


How to capture a runtime error in vbscript?

628