Error on upload to database

recently I’ve begun receiving the below error when I upload by TSV file into the SOTA Database. Anyone have an idea why I’m getting this? Problem at my end or elsewhere???
Thanks for your attention.
73 de n4mj//Glenn (n4mj@yahoo.com)
Server Error in ‘/’ Application.

Specified cast is not valid.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Specified cast is not valid.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidCastException: Specified cast is not valid.]
SOTA.AddChaserEntry.GetS2SScore(SqlConnection dbConnection, Int32 userID) in C:\SOTA\SOTADATABASE = next\AddChaserEntry.cs:28

[ApplicationException: Database Error Reading S2S Score]
SOTA.AddChaserEntry.GetS2SScore(SqlConnection dbConnection, Int32 userID) in C:\SOTA\SOTADATABASE = next\AddChaserEntry.cs:36
SOTA.ChaserCSV3.Button1_Click(Object sender, EventArgs e) in C:\SOTA\SOTADATABASE = next\ChaserCSV3.aspx.cs:93

[ApplicationException: Error in ChaserCSV3.UpdateDatabase]
SOTA.ChaserCSV3.Button1_Click(Object sender, EventArgs e) in C:\SOTA\SOTADATABASE = next\ChaserCSV3.aspx.cs:188
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +155
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446

In reply to N4MJ:

Hi Glen!

Upload process works perfectly. I just uploaded my Sunday log to the system. There is some error(s) in your source file. Fix them and life is easy again!

73, Saku OH2NOS

In reply to N4MJ:
Glenn,
I have had trouble with EXCEL CSV files and now open these using MS Notepad and do a minor edit - remove the extra commas at the end etc - and save as text. Except for my typos it all uploads nicely. Usually my typos get a red highlight so easy to find and fix.

Good luck.

73
Ron

In reply to N4MJ:
Hi Glenn,
I also had an error when I tried to upload such file some time ago, so I have been typing my logs manually into the database since then for each of my activations.
I don’t remember whether the error message was the same you had now or different, but yours sounds a bit familiar to me so it may be it.
However, let me tell you that I recently found a typing mistake or some little error after having handtyped one of my activations log into the database, so I downloaded the wrong log under that CSV format, opened the file, made the little necessary correction and uploaded it back without any errors.
So probably the initial file I tried to upload when I had the mentionned error some time ago, wasn’t having the exact right format.
Good luck and 73 de Guru - EA2IF

In reply to N4MJ:

This part of the error message suggests that there is something wrong with the data in your file: “System.InvalidCastException: Specified cast is not valid.”

The “cast” in this case has nothing to do with fishing or repairing broken limbs, it means that the software is trying to interpret a piece of data that isn’t in the form that the data is expected to be. For example, you could have an invalid date, letters in a field where there is only supposed to be numbers, a decimal number where there is supposed to be an integer number, etc.

Open your file in Notepad and have a look, these types of problems are often easy to spot and correct.

73,

Eric KU6J

===========================================
Free SOTA Spot Monitor Software + RBNGate FAQ:
http://www.ku6j.com

In reply to N4MJ:

Maybe emailing the database manager with a description of what you were doing, the error message(s) and the file you were uploading would give him a chance to help you.

Andy
MM0FMF

In reply to N4MJ:

Or maybe the database manager can use his powers of clairvoyance and find out what was happening anyway.

I found your CSV file for today, found the typo and fixed that. You will have done the same. I was able to repeat your exception report. It’s because you don’t have any S2S contacts logged yet and that is the code that is failing.

I have a fix for the bug (this must be affecting others) but haven’t got time to test it further and upload it tonight or tomorrow.

In the meantime anyone seeing this problem can affect a simple remedy until I can upload some new code. Create yourself a complete bogus S2S entry. Put a comment in saying “BOGUS TO FIX MARCH GETS2S BUG”. You should find as soon as your S2S score is 1 or more you can upload without this happening. Once I’ve uploaded the fix I can reap all the BOGUS S2S contacts and we should be cooking with gas again.

Andy
MM0FMF

I can reap all the BOGUS S2S contacts and we should be cooking with gas again.

Andy, once you finish all the reaping, why not throw the bogus points on top of K6EL so that my new S2S total is, say, 6,518 points. Now that would be a gas.

Elliott, K6EL

In reply to K6ILM:

ROTFL! I had to look at the honour roll to see why 6518 was important!

Andy
MM0FMF

In reply to MM0FMF:
Thanks Andy. I put in the bogus S2S. Next time I upload I’ll see what happens and let you know.

To all others who offered suggestions: TU for your input. Appreciate the ideas and offers of help. 73 de n4mj//Glenn

In reply to N4MJ: I tried using the format on SOTA Database but just got more errors. That seems to be for Activators, although I don’t know why their input would be different other than S2S.

Eventually, I went back to my old format. It worked as intended. Perhaps the cure was inputting the bogus S2S. Got my fingers crossed. For now it is working and I’m not going to fix it if it isn’t broke. hi
Thanks for your support.
73 de n4mj