GeekInterview.com
Series: Subject:
Question: 25 of 30

How we can make a Data Base connectvity for a application in Silk?
Tell me the step -by-step procedure?

Asked by: Interview Candidate | Asked on: Jan 2nd, 2007
Showing Answers 1 - 4 of 4 Answers

Actually in Silk Test there is no separate data store like that of Datapool in Rational and excel Data driver wizard in WinRunner.We should write array  program to pass values from database.

  
Login to rate this answer.
Someone

Answered On : Feb 2nd, 2007

There are 6 commands:

DB_Connect()

DB_Disconnect()

DB_ExecuteSQL()

DB_FinishSQL()

DB_FetchNext()

DB_FetchPrevious()

  
Login to rate this answer.
mnuhoglu

Answered On : Feb 25th, 2007

View all answers by mnuhoglu

// This test uses the functions in DBTester
// to directly access an ODBC database
INTEGER id, iheadID
STRING sDeptName
HDATABASE hdbc
HSQL hstmnt
// connect to SQL 2000 Server Test DB
hdbc = DB_Connect ("DSN=mysql;SRVR=192.168.163.1;PWD=;UID=root")
// retrieve info from Department table
hstmnt = DB_ExecuteSql (hdbc, "SELECT * FROM kurumlar")
// process the information that came back
while( DB_FetchNext(hstmnt, id, adi) )
   print("Id: {id} kurum: {adi}")

DB_Disconnect (hdbc)

  
Login to rate this answer.
Manjunath Biradar

Answered On : May 14th, 2007

[-] SearchText1(int i, int w optional)
[ ] HANDLE hSQL
[ ] HANDLE hDB
[ ] // String iRowReference1=[String]i
[ ] hDB = DB_Connect(sDataSourceIOFilePath)
[ ] // hSQL = DB_ExecuteSQL (hDB,"SELECT FindWhat, Replace FROM InputReplaceData WHERE Set LIKE '"+ iRowReference1 + "'")
[ ] hSQL = DB_ExecuteSQL (hDB,"SELECT FindWhat, Replace FROM ReplaceData ") // WHERE Set LIKE '" + iRowReference1 + "'")
[ ]
[-] while(DB_FetchNext(hSQL,ReplaceData))
[ ] WordPad.SetActive()
[ ] WordPad.Edit.Replace.Pick()
[ ] Sleep(1)
[ ] Print(" test is pass")
[ ] Replace.FindWhat.SetText(ReplaceData.FindWhat)
[ ] sleep(1)
[ ] Replace.FindNext.Click()
[ ] Sleep(1)
[ ] Print("The Searched Data is =", ReplaceData.FindWhat)
[ ] Sleep(1)
[ ] Replace.ReplaceWith.SetText(ReplaceData.Replace)
[ ] Sleep(1)
[ ] Replace.Replace.Click()
[ ] Sleep(1)
[ ] WordPad3.SetActive()
[ ] WordPad3.OK.Click()
[ ] Sleep(1)
[ ] Replace.Cancel.Click()
[ ] DB_FinishSql(hSQL)
[ ] DB_Disconnect(hDB)


  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.