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

Showing Answers 1 - 12 of 12 Answers

Someone

  • Feb 2nd, 2007
 

There are 6 commands:
DB_Connect()
DB_Disconnect()
DB_ExecuteSQL()
DB_FinishSQL()
DB_FetchNext()
DB_FetchPrevious()

  Was this answer useful?  Yes

mnuhoglu

  • Feb 25th, 2007
 

// 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)

  Was this answer useful?  Yes

Manjunath Biradar

  • 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)


  Was this answer useful?  Yes

Give your answer:

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

 

Related Answered Questions

 

Related Open Questions