PC Review


Reply
Thread Tools Rate Thread

convert c# data to sql data

 
 
Chi Tang
Guest
Posts: n/a
 
      16th Jul 2003
Hi,

Does anybody know where I can get some samples to pass C# data to sql data?
For example, I need to pass some date data to a sql 'smalldatatime' data but
I did not know how. Thanks,

CT


 
Reply With Quote
 
 
 
 
Kathleen Dollard
Guest
Posts: n/a
 
      16th Jul 2003
Chi,

Can you post the code that isn't working for you?

There are samples in the quick starts

Kathleen


"Chi Tang" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> Hi,
>
> Does anybody know where I can get some samples to pass C# data to sql

data?
> For example, I need to pass some date data to a sql 'smalldatatime' data

but
> I did not know how. Thanks,
>
> CT
>
>



 
Reply With Quote
 
Chi Tang
Guest
Posts: n/a
 
      16th Jul 2003
Hi,

The following code shows that I try to pass a 'smalldatetime' data to the
'Today_Date' column when I add a new row to a table. I use the
'DateTimeFormatInfo' object to get the today date but did not know how to
convert to a sql 'smalldatetime'. Thanks for help.

DataSet ds = new DataSet("MyTable");

adapter.Fill(ds, "MyTable");

DataTable tbl = ds.Tables["MyTable];


DataRow row = tbl.NewRow();

row["Today_Date"] = ?; // this column data is a smalldatetime in sql

tbl.Rows.Add(row);







"Kathleen Dollard" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Chi,
>
> Can you post the code that isn't working for you?
>
> There are samples in the quick starts
>
> Kathleen
>
>
> "Chi Tang" <(E-Mail Removed)> wrote in message
> news:#(E-Mail Removed)...
> > Hi,
> >
> > Does anybody know where I can get some samples to pass C# data to sql

> data?
> > For example, I need to pass some date data to a sql 'smalldatatime' data

> but
> > I did not know how. Thanks,
> >
> > CT
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert One Column Data to Multiple Columns Data Rob K Microsoft Access Queries 4 8th Feb 2010 04:33 PM
How do I convert row data to column data in Access design query =?Utf-8?B?VHJhbnNwb3NlIGRhdGEgaW4gcm93cyB0byBjb2x1 Microsoft Access Queries 7 22nd Feb 2008 07:32 PM
How to convert UTF8 data to a ASCII data? Hooyoo Microsoft C# .NET 1 5th Jan 2007 05:34 AM
I want to convert word column data to excel row data to sort addre =?Utf-8?B?Y3JheXdpbGw=?= Microsoft Excel Misc 0 18th Apr 2006 07:16 PM
can i convert data copied as an image into data in excel ? =?Utf-8?B?cHJhYmhhdA==?= Microsoft Excel Worksheet Functions 1 1st Mar 2005 12:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:39 AM.