How to import Xl sheet or XLSheet data in Silk Tool 2006 R2How to use call function in Silk Tool 2006 R2.

Questions by SasidharReddy

Showing Answers 1 - 3 of 3 Answers

Use this code to import excel data. You can find the same example in silk test help also.

[+] testcase DBColumnsExample () appstate none
  [ ] // Retrieve all columns beginning with the letter 'i' (or 'I') for all tables
  [ ] // beginning with the letter 'p' (or 'P').
  [ ] // Assume that hdbc is a valid database handle returned from DB_Connect().
  [ ] STRING cat, sch, tbl, col, ignore, table, column, dtype
  [ ]
  [ ] tbl = "p%"
  [ ] cat = NULL
  [ ] sch = NULL
  [ ] col = "i%"
  [ ]
 [-] HDATABASE hdbc
  [ ] HSQL hstmnt
  [ ]
 [ ]
 [-] hdbc = DB_Connect("DSN=<DSNNAME>")
  [ ]
  [ ] hstmnt = DB_Columns (hdbc, cat, sch, tbl, col)
  [ ]
  [ ] // retrieve and print only column name and type; ignore the rest.
  [-] while(DB_FetchNext (hstmnt, ignore, ignore, table, column, ignore, dtype)== TRUE)
   [ ]  Print ("({dtype}) {table}.{column}")
  [ ] DB_FinishSql (hstmnt)
  [ ]
  [ ] DB_Disconnect (hdbc)

  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