how to save the textbox contents to sql server database

  • Thread starter Thread starter Dhananjay
  • Start date Start date
D

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
 
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!

--
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
 
Ryan said:
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?


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
 
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!

--
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?


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
 
I converted it to C# for you:

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

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

--
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!

--
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?


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
 
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.
 
Back
Top