473,396 Members | 1,859 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,396 software developers and data experts.

Only first character of text inserting into DB

I am using a SqlDataSource to put data into a database from three
TextBoxes.

The problem is that only the first character from the TextBoxes is
being inserted into the database.

The code:

<InsertParameters>
<asp:ControlParameter ControlID="TextBox2" Name="Text1"
Type="String" />
<asp:ControlParameter ControlID="TextBox3" Name="Text2"
Type="String" />
<asp:ControlParameter ControlID="TextBox4" Name="Text3"
Type="String" />
</InsertParameters>
The schema:

UID int
Text1 nvarchar(4000)
Text2 nvarchar(4000)
Text3 nvarchar(4000)

UID is a primary key, and auto-increments.

Any ideas?

Aug 29 '06 #1
2 1560
Where is the SQL? It sounds like your SQLparameter doesn't have a length set.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"bm****@mnepilepsy.net" wrote:
I am using a SqlDataSource to put data into a database from three
TextBoxes.

The problem is that only the first character from the TextBoxes is
being inserted into the database.

The code:

<InsertParameters>
<asp:ControlParameter ControlID="TextBox2" Name="Text1"
Type="String" />
<asp:ControlParameter ControlID="TextBox3" Name="Text2"
Type="String" />
<asp:ControlParameter ControlID="TextBox4" Name="Text3"
Type="String" />
</InsertParameters>
The schema:

UID int
Text1 nvarchar(4000)
Text2 nvarchar(4000)
Text3 nvarchar(4000)

UID is a primary key, and auto-increments.

Any ideas?

Aug 29 '06 #2
Ah thank you!

The stored procedure was using chars instead of nvarchars.

Peter wrote:
Where is the SQL? It sounds like your SQLparameter doesn't have a length set.
Peter

Any ideas?
Aug 29 '06 #3

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

Similar topics

12
by: frizzle | last post by:
Hi there! I have (for sofar) a small problem: I have a site, with mySQL-backend, and an online admin system. The site is in three languages: 1 of them is German. My poblem concerns the 'ß'...
18
by: OrenFlekser | last post by:
Hi I've posted this message couple of days ago, but I can't find it now, so sorry if you see it twice... Anyways - I have a text box, and I want my users to be able to write only in english...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
35
by: RyanS09 | last post by:
Hello- I am trying to write a snippet which will open a text file with an integer on each line. I would like to read the last integer in the file. I am currently using: file = fopen("f.txt",...
3
by: ags5406 | last post by:
I have an application written in VB.NET that calls functions in a FORTRAN .DLL. All compiled (release for VB.NET and FORTRAN), with the .EXE and the .DLL and other support files all in the same...
11
by: coomberjones | last post by:
I have a few std::strings that I am using to store raw binary data, each of which may very well include null bytes at any point or points. I want to slap them together into a single string, so I...
5
by: =?Utf-8?B?bXBhaW5l?= | last post by:
Hello, I am completely lost as to why I can't update a DropDownList inside a DetailsView after I perform an insert into an object datasource. I tried to simply it down to the core demostration:...
2
by: AlexanderDeLarge | last post by:
Hi! I got a problem that's driving me crazy and I'm desperately in need of help. I'll explain my scenario: I'm doing a database driven site for a band, I got these tables for their discography...
6
by: gita ziabari | last post by:
Hello All, The following code does not work for unicode characters: keyword = dict() kw = 'ÇÅÎÓËÉÈ' keyword.setdefault(key, ).append (kw) It works fine for inserting ASCII character. Any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.