GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Tech FAQs  >  SilkTest

 Print  |  
Question:  How to import Xl sheet or XLSheet data in Silk Tool 2006 R2

How to use call function in Silk Tool 2006 R2.




December 12, 2007 23:14:14 #1
 NATRAJ00   Member Since: December 2006    Total Comments: 6 

RE: How to import Xl sheet or XLSheet data in Silk Tool 2006 R2How to use call function in Silk Tool 2006 R2.
 
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)
     

 

Back To Question