473,320 Members | 2,104 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,320 software developers and data experts.

how to save the textbox contents to sql server database

hi everyone
i have a problem
how to save the textbox contents to sql server database.
i am getting this contents after conversion from web browser into
textbox(multiline)
I want to store all the contents of textbox in sql server database.
i ahve generated a table.
if u have any idea then let me know the coding for this in C#.net

Nov 27 '06 #1
6 5773
Well, I haven't worked with c#, but I may be able to help.

If you set the cell to text, you can save multiline strings. also, if you
set it to nvarchar(MaxNumberOfChars), you can also achieve this.

Are you using a dataset to work with the database, or are you using a more
direct approach?

--
Thiele Enterprises - The Power Is In Your Hands Now!

--
"Dhananjay" <dh**********@yahoo.co.inwrote in message
news:11**********************@l39g2000cwd.googlegr oups.com...
hi everyone
i have a problem
how to save the textbox contents to sql server database.
i am getting this contents after conversion from web browser into
textbox(multiline)
I want to store all the contents of textbox in sql server database.
i ahve generated a table.
if u have any idea then let me know the coding for this in C#.net
Nov 27 '06 #2

Ryan S. Thiele wrote:
Well, I haven't worked with c#, but I may be able to help.

If you set the cell to text, you can save multiline strings. also, if you
set it to nvarchar(MaxNumberOfChars), you can also achieve this.

Are you using a dataset to work with the database, or are you using a more
direct approach?

--
Thiele Enterprises - The Power Is In Your Hands Now!


I am using dataset .i have all the contrlos on a single win forms.
some toolstrip for open , new , save , showhtml , print.
some more like web browser, nad multiline textbox. thats it
i am unable to do it. can u help me to solve this.
its urgent plz.

Thanks in advance
Dhananjay

Nov 27 '06 #3
You databind the textbox to the cell in the dataset.

of you can code it.

MyDataset.MyDatatable(rowindex).TextToSave = Textbox.text

Then just update the dataset.

VB2003:
MyDataset.Update(MyDataSet.MyDatatable)

VB2005:
MyDataTableAdapter.Update(MyDataset.MyDataTable)

Did this work? Or, is it what you wanted?
--
Thiele Enterprises - The Power Is In Your Hands Now!

--
"Dhananjay" <dh**********@yahoo.co.inwrote in message
news:11**********************@f16g2000cwb.googlegr oups.com...

Ryan S. Thiele wrote:
Well, I haven't worked with c#, but I may be able to help.

If you set the cell to text, you can save multiline strings. also, if you
set it to nvarchar(MaxNumberOfChars), you can also achieve this.

Are you using a dataset to work with the database, or are you using a more
direct approach?

--
Thiele Enterprises - The Power Is In Your Hands Now!


I am using dataset .i have all the contrlos on a single win forms.
some toolstrip for open , new , save , showhtml , print.
some more like web browser, nad multiline textbox. thats it
i am unable to do it. can u help me to solve this.
its urgent plz.

Thanks in advance
Dhananjay
Nov 27 '06 #4
I converted it to C# for you:

MyDataset.MyDatatable(rowindex).TextToSave = Textbox.text;

--
Thiele Enterprises - The Power Is In Your Hands Now!

--
"Ryan S. Thiele" <ma*****@verizon.netwrote in message
news:1JBah.10129$d42.692@trndny07...
You databind the textbox to the cell in the dataset.

of you can code it.

MyDataset.MyDatatable(rowindex).TextToSave = Textbox.text

Then just update the dataset.

VB2003:
MyDataset.Update(MyDataSet.MyDatatable)

VB2005:
MyDataTableAdapter.Update(MyDataset.MyDataTable)

Did this work? Or, is it what you wanted?
--
Thiele Enterprises - The Power Is In Your Hands Now!

--
"Dhananjay" <dh**********@yahoo.co.inwrote in message
news:11**********************@f16g2000cwb.googlegr oups.com...

Ryan S. Thiele wrote:
Well, I haven't worked with c#, but I may be able to help.

If you set the cell to text, you can save multiline strings. also, if you
set it to nvarchar(MaxNumberOfChars), you can also achieve this.

Are you using a dataset to work with the database, or are you using a more
direct approach?

--
Thiele Enterprises - The Power Is In Your Hands Now!


I am using dataset .i have all the contrlos on a single win forms.
some toolstrip for open , new , save , showhtml , print.
some more like web browser, nad multiline textbox. thats it
i am unable to do it. can u help me to solve this.
its urgent plz.

Thanks in advance
Dhananjay

Nov 27 '06 #5
People here may be able to help you, but if you really want
C# solutions, try posting your message in the C# newsgroup
microsoft.public.dotnet.languages.csharp instead of in a VB newgroup.

Robin S.
---------------------------------
"Dhananjay" <dh**********@yahoo.co.inwrote in message
news:11**********************@l39g2000cwd.googlegr oups.com...
hi everyone
i have a problem
how to save the textbox contents to sql server database.
i am getting this contents after conversion from web browser into
textbox(multiline)
I want to store all the contents of textbox in sql server database.
i ahve generated a table.
if u have any idea then let me know the coding for this in C#.net

Nov 27 '06 #6
Examples with VB.Net and C# using ADO and ADO.Net

http://support.sas.com/ctx/samples/index.jsp?sid=817

Thanks,

Seth Rowe
Dhananjay wrote:
hi everyone
i have a problem
how to save the textbox contents to sql server database.
i am getting this contents after conversion from web browser into
textbox(multiline)
I want to store all the contents of textbox in sql server database.
i ahve generated a table.
if u have any idea then let me know the coding for this in C#.net
Nov 27 '06 #7

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

Similar topics

0
by: Prashant | last post by:
how can i save the contents of a text box which is formatted wit hcolors and different fonts in a word file and retain the same file later in MS word without any problem
8
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box...
0
by: craig dunn | last post by:
I've used the code from the post for a while now... but recently upgraded to SQL Server 2005. I've written a new script for SQL Server 2005, which can be found at...
0
by: sangitadeori | last post by:
Hai M Sangita,I m working with C#.Net on windows application,I want to know that suppose we are browsing through some folder using Opendialogbox,it is showing me only the path in the textbox.But I...
1
by: parvane | last post by:
hello how can i store a text1.text at my form so that when i reload that form the content of that text hasn't gone?
1
by: papafreebird | last post by:
I would like to save the contents of a wxListBox to a text file. Using borland c++ builder I am able to accomplish this by using the following code ListBox1->Items->GetText(); ...
1
by: plusplus | last post by:
Hi, How can i save datagrid contents to database? Database i'm using is MySQL. Thanks lots! (:
4
by: Mr Gray | last post by:
Hi Guys, My requirement is to scan an FTP directory for the presence of 4 files and if a specific file exists I can begin to GET those files, read the contents and save the contents into an SQL...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.