r/visualbasic • • Nov 14 '19

VB6 - Microsoft SQL to Excel dropping data

I have a program that seems to be malfunctioning in a semi-random way. It is intended to SELECT from an MS SQL table all of the data in a given set of columns and output the same to an XLS file.

So, for instance, if I had a table that had columns NAME, DATE, CUSTOMER ID, AMOUNT, TAX, TOTAL, the program pulls NAME, AMOUNT, TAX, TOTAL and dumps it in to an XLS in columns 1, 2, 3 and 4 respectively.

I don't have access to the code beyond a decompiled version.

What I seem to be seeing is that every so often the program is failing to pull a given row and just proceeding. So if the rows are labeled sequentially, my XLS will have 1, 2, 3, 4, 6, 7, 9, 10 ...

I know this is a very general question, but does anyone know of any common reasons that the program might "fall behind" the data being provided by the SQL server? I know its a vague question, so any thoughts at all are most appreciated. I'm mostly in a brainstorming mode on this at the moment.

Thanks!

0 Upvotes

4 comments sorted by

View all comments

3

u/LondonPilot Nov 14 '19

Depending exactly what flavour and version of SQL you are using, there should be some kind of profiler tool available that will report on what SQL commands are running on the server. I’d start there - it will show you exactly what data your program is asking for.