SQL Server 2000General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
ie, your field width may be 100 and you are trying to insert a string with 101 or greater charecters.
Many many thank to u . well i inserted the following data and it worked wel(http://i5.photobucket.com/albums/y18...od007/form.gif). Could u tell me where i can increase the site of these fields? In the form or in the sql server 2000 ?Thanks
Set the MaxLength Property of the textboxes to the corresponding field width in the DB table. So you will not get any such errors more as the user will not be able to enter more no of charecters.
Now you can enter the data and find out which field is short of width.
If you need more width add that to the DB table field as well as increase the maxlength of the textbox
TO convert to access 2000 db, you should use System.Data.OleDb intsead of System.Data.SqlClient. Thus every thing starting with Sql will start with OleDb (OleDbCommand,OleDbConnection...).
Also enclose date in #.