Link to home
Start Free TrialLog in
Avatar of Dan560
Dan560Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Unhandled Exception: System.FormatException: Input string was not in a correct format.

Hi,

I routinely run a import script written in VB that connects to my MYSQL server and imports data into tables.

I did not write this script, nor am I familiar with the Visual Basic scripting language. So I would really appreciate some help.

Our MYSQL database is hosted and managed in the cloud. Our hosting providers recently upgraded our server to 4.0.16. ( I know it's old).. however after the upgrade my script is not working please find my error message below.. please can someone help?

Connecting to MySQL...
server=83.x.x.x;user=x.x.x.x;database=swdata;port=5002;password=x.x.x.x

Unhandled Exception: System.FormatException: Input string was not in a correct f
ormat.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffe
r& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo in
fo)
   at MySql.Data.Common.DBVersion.Parse(String versionString)
   at MySql.Data.MySqlClient.NativeDriver.Open()
   at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
   at MySql.Data.MySqlClient.MySqlPool.GetConnection()
   at MySql.Data.MySqlClient.MySqlConnection.Open()
   at Daily_Report.Daily_Report.Main() in C:\scripts\daily\\Module1.vb:line 69
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

What is on line 69?
Avatar of Dan560

ASKER

DBconnection1.Open()
Can you show some more code? The connection string you showed above and surrounding code.
Avatar of Dan560

ASKER

please find the attached code.
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dan560

ASKER

ok apologies for posting in the wrong forum