473,398 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Format problem...

Can someone please tell me why I might be getting the following error!

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

Source Error:
Line 76: Sub DGPages_Update(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
Line 77: 'Read in the values of the updated row
Line 78: Dim pageID As Integer = e.Item.Cells(1).Text ' Error line
Line 79: Dim modificationDate As Double = CType(e.Item.Cells(2).Controls(0), TextBox).Text
Line 80: Dim description As String = CType(e.Item.Cells(3).Controls(0), TextBox).Text

...:: CODE
Nov 18 '05 #1
1 817
Hi,

e.Item.Cells(3).Text returns your a string. So, to assign it to a Integer,
use Int32.Parse() or set Option Strict Off. In either case, make sure, you
get a valid value (that can be converted as integer) for
e.Item.Cells(3).Text

HTH.

"Tim::.." <myatix_at_hotmail.com> wrote in message
news:B4**********************************@microsof t.com...
Can someone please tell me why I might be getting the following error!

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

Source Error:
Line 76: Sub DGPages_Update(ByVal sender As Object, ByVal e As
DataGridCommandEventArgs)
Line 77: 'Read in the values of the updated row
Line 78: Dim pageID As Integer = e.Item.Cells(1).Text ' Error line
Line 79: Dim modificationDate As Double =
CType(e.Item.Cells(2).Controls(0), TextBox).Text
Line 80: Dim description As String =
CType(e.Item.Cells(3).Controls(0), TextBox).Text

...:: CODE
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bernd Lambertz | last post by:
I have a problem with bcp and format files. We changed our databases from varchar to nvarchar to support unicode. No problems so fare with that. It is working fine. But now I need a format...
6
by: Dario Di Bella | last post by:
Hi all, we have the following urgent issue affecting our development team. Initially we had one particular workstation that failed executing queries on a DB2 database, raising an invalid date...
8
by: Ishbel Kargar | last post by:
Since upgrading from old laptop (Windows 98) to new laptop (Windows XP), my mail-merge letters are doing strange things with date formats. For instance, my reminder letter for lapsed subs carries...
2
by: Pat | last post by:
Here is my problem that I am having with a current project. I went and backed up all my hard drives to DVD's. After backing up the drives, I used a batch file to get all the file names from the...
3
by: karthikla | last post by:
Hi Experts, Could you please help me on how to get access 2002 file format exactly while doing conversion from Access 97 file format by DBEngine.CompactDatabase() function? Code: Private...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.