By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,569 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,569 IT Pros & Developers. It's quick & easy.

how to save the textbox contents to sql server database

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a

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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.