CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: why time delay?

Threaded View

  1. #1
    Join Date
    Oct 2005
    Posts
    175

    Resolved why time delay?

    I am fetching data from sql server. I am using windows2000 professional
    and the database is on the server system running server2003

    there are lacks of records in the table, I am adding a particular field in the list box but it is taking too much time. Can we reduce the proccessing time by any mean

    i am using the following lines
    _________________________

    cn.ConnectionString = "Provider=SQLOLEDB;Persist Security
    Info=False;User ID=admin1234;Password=sql-server;Initial Catalog=db_cash; Data Source=sql-server"
    cn.open

    Dim ssql As String
    ssql = "Select * from cb_payments_detail order by voucher_no"
    Set rs = New ADODB.Recordset
    rs.Open ssql, cn, adOpenDynamic, adLockPessimistic
    rs.MoveFirst
    rs.MoveFirst
    Do Until j = 100000
    List1.AddItem (rs!voucher_no)
    rs.MoveNext
    j = j + 1
    Loop
    rs.Close
    __________________________________

    regards
    shiv
    Last edited by shivkumar; January 10th, 2006 at 04:59 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured