Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SpeedUp my filling command with foxpro table

Status
Not open for further replies.

Frush

Programmer
Jun 27, 2002
75
CA
hi, I made my self a class that fill a dataset and send it back. Been using this for a while now but I need it to be faster. I have to acces a database with 150000 rows and return them all. In foxpro it takes 0.00 second to return the data in VB.NET it takes 5minutes

Public Sub New(ByVal leRepertoire As String)
retry_timeout = 0
Me.m_conn = New OleDbConnection("Provider=VFPOLEDB.1;Data Source=" & leRepertoire & ";Mode=Share Deny None;Extended Properties="""";User ID="""";Password="""";Mask Password=False;Cache Authentication=False;Encrypt Password=False;Collating Sequence=MACHINE;DSN="""" ")
End Sub

'Fonction qui permet de faire une requete
'Retour: le dataset avec les données
Public Function getDS(ByVal requete As String) As DataSet
Try
retry_timeout += 1
Dim maCommandeOLEdb As OleDbDataAdapter 'le data adapter
Dim tmpDS As New DataSet 'le dataset

'Rempli de dataset Foxpro
maCommandeOLEdb = New OleDbDataAdapter(requete, m_conn)
maCommandeOLEdb.Fill(tmpDS) <<<< this takes for ever

if anyone got suggestion and changing my Select query aint a solution for what I need.. please let me know
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top