Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding value from database to datatable
#1
Solved: 10 Years, 9 Months, 1 Week ago
I have written the following code to add data from db to datatable
before this i have specified connection string.
Code:
strSQL = " Select * from UserId"
Set objResults = objDB.Execute(strSQL)
nrow=1
Do Until objResults.EOF
    strUserid = objResults.Fields("UserId")
    Datatable.SetCurrentRow(nrow)
    Datatable.GlobalSheet.AddParameter "UserId" , strUserid
    msgbox Datatable("UserId",dtGlobalSheet)
    Reporter.ReportEvent micDone, strUserid , " "
    objResults.MoveNext
    nrow=nrow+1
Loop
now my problem is data is added to the same row like
UserId UserId1
12 31
but i want them like this
UserId
12
31

I need help on this
Thanks in advance
Reply


Messages In This Thread
Adding value from database to datatable - by kriday - 07-04-2013, 02:32 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pages and Frames adding _1, _2, _3... zunebuggy 1 1,512 05-30-2017, 12:17 AM
Last Post: Vichu M J
  Adding negative amount in webedit Rose 1 2,010 06-30-2016, 09:34 PM
Last Post: babu123
  Adding data into rows that add dynamically with setcelldata azar81 4 5,665 04-13-2015, 05:24 PM
Last Post: vidya2k2
  Function writes data from datatable to database Fairbanks 0 2,403 06-27-2014, 07:51 PM
Last Post: Fairbanks
  adding webtable to dictonaryobject prabu211989 2 2,436 01-06-2014, 07:56 PM
Last Post: Parke

Forum Jump:


Users browsing this thread: 2 Guest(s)