Click here to Skip to main content
15,900,258 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: wallpaper problem Pin
Dave Kreskowiak28-Dec-08 19:44
mveDave Kreskowiak28-Dec-08 19:44 
QuestionDownloadQueue [modified] Pin
Noctris28-Dec-08 2:19
Noctris28-Dec-08 2:19 
AnswerRe: DownloadQueue Pin
Ben Fair29-Dec-08 9:20
Ben Fair29-Dec-08 9:20 
QuestionVB.NET application to login in Website Pin
shrekage27-Dec-08 17:30
shrekage27-Dec-08 17:30 
AnswerRe: VB.NET application to login in Website Pin
Tony Richards28-Dec-08 1:34
Tony Richards28-Dec-08 1:34 
AnswerRe: VB.NET application to login in Website Pin
Mycroft Holmes28-Dec-08 15:10
professionalMycroft Holmes28-Dec-08 15:10 
QuestionWindows Mobile Toolbar Pin
UniBond27-Dec-08 14:58
UniBond27-Dec-08 14:58 
QuestionVB.NET - OLEDB with Foxpro table Pin
iluha27-Dec-08 13:49
iluha27-Dec-08 13:49 
Hi!
I'm trying to run a process that updates a zip/tax rate table.

The new tax rates are in a flat file. the table I need to update is a FoxPro free table indexed in country and zipcode fields.

Everything is working, but I have 45K+ records to update and after about 15% into the flat file the process it gets slooooow and gets slower and slower.

If I comment out the code that does search and just leave the code that goes through the flat file it takes about 30 seconds with the looks up and update it takes 30+ minutes and I can see the progress bar miving for first 15% and than it dies.... I think I am missing something here...

Here is what the code looks like:

m_conn = New OleDbConnection
m_conn.ConnectionString = "Provider=VFPOLEDB.1;" & _
"Data Source=" & g_app_options.processing_folder_path & "output\tax import;" & _
"Mode=ReadWrite|Share Deny None;" & _
"Collating Sequence=MACHINE;"
m_conn.Open()

Do While srTaxFile.EndOfStream = False

ado_command = New OleDb.OleDbCommand("SELECT ZIPCODE FROM zip WHERE country='001' AND ZIPCODE='" & taxRecord.field(cTaxRecord.RecordFieldIDs.ZipCode).Trim & "'", m_conn)
Dim sZipCode As String = ado_command.ExecuteScalar()

ado_command = New OleDb.OleDbCommand("UPDATE zip SET itaxr = " & taxRecord.field(cTaxRecord.RecordFieldIDs.SalesTaxRate).Trim & " WHERE zipcode='" & taxRecord.field(cTaxRecord.RecordFieldIDs.ZipCode).Trim & "'", m_conn)
ado_command.ExecuteNonQuery()

set_progress(srTaxFile.BaseStream.Length, srTaxFile.BaseStream.Position)

Loop

Its pretty simple, and I don't understand why it takes that long. This is running on a local drive.

If you can help or know what I'm missing, I would greatly appreciate it!

Thank you
ipokrov
AnswerRe: VB.NET - OLEDB with Foxpro table Pin
CodingYoshi27-Dec-08 21:56
CodingYoshi27-Dec-08 21:56 
GeneralRe: VB.NET - OLEDB with Foxpro table Pin
iluha28-Dec-08 4:26
iluha28-Dec-08 4:26 
GeneralRe: VB.NET - OLEDB with Foxpro table Pin
CodingYoshi29-Dec-08 3:18
CodingYoshi29-Dec-08 3:18 
GeneralRe: VB.NET - OLEDB with Foxpro table Pin
Ben Fair29-Dec-08 8:54
Ben Fair29-Dec-08 8:54 
QuestionVB.net & XML Pin
Shazz Rock26-Dec-08 21:50
Shazz Rock26-Dec-08 21:50 
AnswerRe: VB.net & XML Pin
Guffa27-Dec-08 3:58
Guffa27-Dec-08 3:58 
Questionresizing a tree node Pin
Sanam26-Dec-08 21:07
Sanam26-Dec-08 21:07 
AnswerRe: resizing a tree node Pin
Dave Kreskowiak27-Dec-08 5:51
mveDave Kreskowiak27-Dec-08 5:51 
GeneralAnyone with web browser making experience please read this! Pin
113st4life26-Dec-08 20:43
113st4life26-Dec-08 20:43 
GeneralRe: Anyone with web browser making experience please read this! Pin
Colin Angus Mackay27-Dec-08 8:30
Colin Angus Mackay27-Dec-08 8:30 
GeneralRe: Anyone with web browser making experience please read this! Pin
Mycroft Holmes28-Dec-08 16:20
professionalMycroft Holmes28-Dec-08 16:20 
GeneralRe: Anyone with web browser making experience please read this! Pin
113st4life28-Dec-08 22:20
113st4life28-Dec-08 22:20 
QuestionCrystal Report Opening Problem. Pin
Nanda_MR26-Dec-08 18:26
Nanda_MR26-Dec-08 18:26 
QuestionNeed similar Coding for Treeview Pin
bharanidharanit26-Dec-08 15:46
bharanidharanit26-Dec-08 15:46 
AnswerRe: Need similar Coding for Treeview Pin
bharanidharanit28-Dec-08 14:39
bharanidharanit28-Dec-08 14:39 
Questioncrystal report with vb6 Pin
blade0426-Dec-08 7:38
blade0426-Dec-08 7:38 
AnswerRe: crystal report with vb6 Pin
Christian Graus26-Dec-08 12:12
protectorChristian Graus26-Dec-08 12:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.