Home All Groups Group Topic Archive Search About

how to save the textbox contents to sql server database

Author
27 Nov 2006 11:57 AM
Dhananjay
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

Author
27 Nov 2006 12:37 PM
Ryan S. Thiele
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" <dhananjay***@yahoo.co.in> wrote in message
news:1164628672.813818.302180@l39g2000cwd.googlegroups.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
Author
27 Nov 2006 1:22 PM
Dhananjay
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
Author
27 Nov 2006 1:27 PM
Ryan S. Thiele
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" <dhananjay***@yahoo.co.in> wrote in message
news:1164633767.435843.100010@f16g2000cwb.googlegroups.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
Author
27 Nov 2006 1:34 PM
Ryan S. Thiele
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" <mali***@verizon.net> wrote 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" <dhananjay***@yahoo.co.in> wrote in message
news:1164633767.435843.100010@f16g2000cwb.googlegroups.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
Author
27 Nov 2006 4:58 PM
RobinS
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.
---------------------------------
Show quoteHide quote
"Dhananjay" <dhananjay***@yahoo.co.in> wrote in message
news:1164628672.813818.302180@l39g2000cwd.googlegroups.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
>
Author
27 Nov 2006 7:08 PM
rowe_newsgroups
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:
Show quoteHide quote
> 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