Wednesday, July 23, 2008

set conn=createobject("adodb.connection")

set rs=createobject("adodb.recordset")

' Oracle client is required to be installed on your box

conn.open= "Provider=OraOLEDB.Oracle.1;Password=***;

PersistSecurity Info=True;

User ID=****;

SERVER=****;

DataSource=****;

DBQ=****;

"sql="your sql query to retrive the records"

rs.open sql,connrs.close

set rs=nothing

conn.close

set conn=nothing

How to connect to the Database from QTP?

set conn=Createobject("ADODB.Connection")
Srvname="Driver={Microsoft ODBC for Oracle}:Server=DBserver,UID=Sa,Password=sa" conn.open Srvname
Set Rec = CreateObject("ADODB.Recordset")
SQL="select * from Users"
Rec.open SQL ,conn
Username=Rec.fields("employee name")
Msgbox Username



Microsoft ADO (ActiveX Data Objects) is a Component object model object for accessing data sources.The ADO Recordset object is used to hold a set of records from a database table. A Recordset object consist of records and columns (fields).In ADO, this object is the most important and the one used most often to manipulate data from a database.Srvname is a connection string.if u already installed oracle in your system..using that path u can connect oracle database...if u dont have oracle give the conncetion string path..whatever connection string created used in database checkpoint by default...
Example:
DSN=QT_Flight32;DBQ=C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight32.mdb;Driver=C:\WINDOWS\system32\odbcjt32.dll;DriverId=281;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;

Tuesday, July 22, 2008

How to Change All the Lowercase Letters in an Excel Worksheet to Uppercase Letters?

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Add()
Set objWorksheet = objWorkbook.Worksheets(1)
objWorksheet.Cells(1,1) = "abcdef" 'enter data in the cells
objWorksheet.Cells(1,2) = "ghijkl"
objWorksheet.Cells(1,3) = "mnopqr"
objWorksheet.Cells(1,4) = "stuvwx"
Wait (10)
Set objRange = objWorksheet.UsedRange
For Each objCell in objRange
objCell.Value = UCase(objCell.Value)
Next

Sunday, July 20, 2008

Sample Descriptive programing

This summary is not available. Please click here to view the post.

Wednesday, July 16, 2008

List of H1B Questions Asked me in Visa Interview

1. Wht's the purpose of ur trip to united States?

2. Why do u wnt to Work in US?

3. Will you come back to INDIA & whn?

4. Whts ur overall IT experience?

5. Whts ur roles & responsibilites in US Company?

6. Who's ur client?

7. Wht's ur current project ur gng to wrk in US?

8. Wht's ur highest educational qualification?

9. Ur stream is non IT, hw u hav been in IT field?

10. Wht r the technologies ur wrkng on?

11. Can i c ur client letter, company's tax details ?

12. Can i c DS-156, DS-157, I-797B, I-129, Certificates, Last six months bank transactions etc....


Regards,

PavanKumar Nandagiri......................

Google Search

Google