I am using VB.NET 2003 and SQL Server 2000.
The program uses ADO.NET .
The following instruction:
Me.cd_insertDataRecord.ExecuteNonQuery()
throws this exception:
">>>ProcessDataRecord/ Exception: Type= System.FormatException Message: Input string was not in a correct format.
StackTrace: at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at StoreIrisFiles.Form1.ProcessDataRecord(clsCompany objSender, clsCompany objReceiver, String strRecord) in C:\VS.NET\MyProgs\01-VBcurrent\StoreIrisFiles\Form1.vb:line 553
Source:System.Data"
Command text and type are:
Me.cd_insertDataRecord.CommandText = "p_insertDataRecord"
Me.cd_insertDataRecord.CommandType = System.Data.CommandType.StoredProcedure
The connection is open explicitly.
Who could give me a hint regarding the cause of this exception?
Many thanks,
Dan 3 11725
This is probably something like a Date format which has got an integer in it or something. Basically its telling you that what you tried to insert in the database has data which does not correspond to the type of the field.
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
Time flies when you don't know what you're doing
"dan" <de*@deamon.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl...
I am using VB.NET 2003 and SQL Server 2000.
The program uses ADO.NET .
The following instruction:
Me.cd_insertDataRecord.ExecuteNonQuery()
throws this exception:
">>>ProcessDataRecord/ Exception: Type= System.FormatException Message: Input string was not in a correct format.
StackTrace: at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at StoreIrisFiles.Form1.ProcessDataRecord(clsCompany objSender, clsCompany objReceiver, String strRecord) in C:\VS.NET\MyProgs\01-VBcurrent\StoreIrisFiles\Form1.vb:line 553
Source:System.Data"
Command text and type are:
Me.cd_insertDataRecord.CommandText = "p_insertDataRecord"
Me.cd_insertDataRecord.CommandType = System.Data.CommandType.StoredProcedure
The connection is open explicitly.
Who could give me a hint regarding the cause of this exception?
Many thanks,
Dan
That's what I thought.
However:
-all columns are char with one exception which is datetime
-I am printing the value of that parameter and the format is "mm/dd/yyyy"; in other situations that format has been accepted
-I also outcommented that parameter
On the other hand in conversion errors I usually get more explicit and specific messages such as "could not convert @parameter-name to smalldatetime" or something like that.
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message news:uM**************@TK2MSFTNGP09.phx.gbl...
This is probably something like a Date format which has got an integer in it or something. Basically its telling you that what you tried to insert in the database has data which does not correspond to the type of the field.
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
Time flies when you don't know what you're doing
"dan" <de*@deamon.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl...
I am using VB.NET 2003 and SQL Server 2000.
The program uses ADO.NET .
The following instruction:
Me.cd_insertDataRecord.ExecuteNonQuery()
throws this exception:
">>>ProcessDataRecord/ Exception: Type= System.FormatException Message: Input string was not in a correct format.
StackTrace: at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at StoreIrisFiles.Form1.ProcessDataRecord(clsCompany objSender, clsCompany objReceiver, String strRecord) in C:\VS.NET\MyProgs\01-VBcurrent\StoreIrisFiles\Form1.vb:line 553
Source:System.Data"
Command text and type are:
Me.cd_insertDataRecord.CommandText = "p_insertDataRecord"
Me.cd_insertDataRecord.CommandType = System.Data.CommandType.StoredProcedure
The connection is open explicitly.
Who could give me a hint regarding the cause of this exception?
Many thanks,
Dan
TRY SWAPPING THE DATE FORMAT TO US
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
Time flies when you don't know what you're doing
"dan" <de*@deamon.com> wrote in message news:e6**************@TK2MSFTNGP11.phx.gbl...
That's what I thought.
However:
-all columns are char with one exception which is datetime
-I am printing the value of that parameter and the format is "mm/dd/yyyy"; in other situations that format has been accepted
-I also outcommented that parameter
On the other hand in conversion errors I usually get more explicit and specific messages such as "could not convert @parameter-name to smalldatetime" or something like that.
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message news:uM**************@TK2MSFTNGP09.phx.gbl...
This is probably something like a Date format which has got an integer in it or something. Basically its telling you that what you tried to insert in the database has data which does not correspond to the type of the field.
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
Time flies when you don't know what you're doing
"dan" <de*@deamon.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl...
I am using VB.NET 2003 and SQL Server 2000.
The program uses ADO.NET .
The following instruction:
Me.cd_insertDataRecord.ExecuteNonQuery()
throws this exception:
">>>ProcessDataRecord/ Exception: Type= System.FormatException Message: Input string was not in a correct format.
StackTrace: at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at StoreIrisFiles.Form1.ProcessDataRecord(clsCompany objSender, clsCompany objReceiver, String strRecord) in C:\VS.NET\MyProgs\01-VBcurrent\StoreIrisFiles\Form1.vb:line 553
Source:System.Data"
Command text and type are:
Me.cd_insertDataRecord.CommandText = "p_insertDataRecord"
Me.cd_insertDataRecord.CommandType = System.Data.CommandType.StoredProcedure
The connection is open explicitly.
Who could give me a hint regarding the cause of this exception?
Many thanks,
Dan This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Nobody |
last post by:
Heres the deal... I have an application where I have a list (as in a Windows
list control, but thats not important) displayed to the user. I sort this
list based on the list controls sort function...
|
by: Punisher |
last post by:
Ok I'm trying to reference a specific node in a tree.
TreeNode nodeParentChannel = treeview1.Nodes;
It bugs out with this error: Input string was not in a correct format
Obviously 1.2 is not...
|
by: The Crow |
last post by:
if the reason for error is simple, excuse me. but i cant find what the
reason is. Here is the snippet :
string script = String.Format(@"<script src='common.js'...
|
by: phmyhn |
last post by:
I have two web pages, one is viewlarger.aspx, another one is
shoppingcart.aspx. On the viewlarger.aspx, when clicking "add to cart"
image button, the sub appends the id (passed from another page...
|
by: John Chorlton |
last post by:
I've been attempting to pass a chunk of data back from a child Windows form using public properties on the form and have been getting some odd errors. I wanted to return a row of data to avoid...
|
by: rocio |
last post by:
How can I format a string like this: 12924.999999999999
to print 12,925 ?
|
by: Jen |
last post by:
One user of my application is experiencing an exception "input string not in
correct format". But it makes no sense where it is occurring. It is
occurring when a string from a textbox ("172") is...
|
by: =?Utf-8?B?SmVmZg==?= |
last post by:
I thought this would already be covered here, but my search turned up nothing.
In VS2005, if I use "String" to define a new variable/class, it colors it in
the Aqua color as it does other...
|
by: babakandme |
last post by:
Hi to every body...:D
I'm a novice C++ programmer & I've a question,
How can I write a class as follow to a file...
Class A
{
public:
// Accessors Methods...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |