Click here to Skip to main content
15,903,854 members
Home / Discussions / C#
   

C#

 
GeneralRe: dilema with strings and richtextbox Pin
Heath Stewart28-Dec-04 12:34
protectorHeath Stewart28-Dec-04 12:34 
GeneralRe: dilema with strings and richtextbox Pin
Tyrus18228-Dec-04 12:50
Tyrus18228-Dec-04 12:50 
GeneralRe: dilema with strings and richtextbox Pin
Tyrus18228-Dec-04 13:00
Tyrus18228-Dec-04 13:00 
GeneralperformanceCounter woes Pin
sween327-Dec-04 16:38
sween327-Dec-04 16:38 
GeneralDBAdapter.Fill(), datatype matching. Pin
zecodela27-Dec-04 15:45
zecodela27-Dec-04 15:45 
GeneralRe: DBAdapter.Fill(), datatype matching. Pin
sreejith ss nair27-Dec-04 18:37
sreejith ss nair27-Dec-04 18:37 
GeneralRe: DBAdapter.Fill(), datatype matching. Pin
Heath Stewart27-Dec-04 20:12
protectorHeath Stewart27-Dec-04 20:12 
GeneralRe: DBAdapter.Fill(), datatype matching. Pin
Heath Stewart27-Dec-04 20:20
protectorHeath Stewart27-Dec-04 20:20 
There is no time type in SQL Server. If you're referring to the timestamp type then be sure to read the documentation for the SqlDbType enumeration.

A timestamp translates to a byte[] array. In SQL Server a timestamp is an automatically generated array of binary numbers that is guaranteed to be unique with a database. It is not a time portion of a DateTime or anything like it.

If DataAdapter.Fill is having trouble determining the proper type then you'll need to define the DataColumns in your DataTable within the DataSet manually. The easiest way to do this is to create a typed DataSet using VS.NET.

You can drag-n-drop tables, views, or stored procedures from Server Explorer (i.e., from connected databases) into the designer when you create a new DataSet type. Right-click on your project (or a folder within your project) and click Add->Add New Type. Then click "DataSet", give it a name, and click OK. Now you get what looks like (and actually is) the XML Schema designer. Drag any of those objects from the Server Explorer I mentioned above onto this surface, or design the tables and fields (elements and child elements) yourself. You can even add DataRelations and keys in this view as well.

When you compile your project a typed DataSet is created. Instantiate a new instance of this DataSet instead of the base DataSet class.

For performance improvements, use the typed table and column properties which decrease the number of required look-ups to find the correct table or column, respectively.

On the other hand, you chould change the type in SQL Server. If you intended to have a field that stores just the time, then you need to declare it as a DateTime field in SQL Server. It's your views and what you do with the data that determine if the time, date, or both matter.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralContainer Window for Minimized forms Pin
hybrid7927-Dec-04 14:25
hybrid7927-Dec-04 14:25 
GeneralRe: Container Window for Minimized forms Pin
Heath Stewart27-Dec-04 20:10
protectorHeath Stewart27-Dec-04 20:10 
QuestionHow to assosiate files to my program Pin
mikker_12327-Dec-04 12:00
mikker_12327-Dec-04 12:00 
AnswerRe: How to assosiate files to my program Pin
Heath Stewart27-Dec-04 20:01
protectorHeath Stewart27-Dec-04 20:01 
QuestionImageList SizeMode ? Pin
geestje27-Dec-04 11:21
geestje27-Dec-04 11:21 
AnswerRe: ImageList SizeMode ? Pin
Heath Stewart27-Dec-04 19:58
protectorHeath Stewart27-Dec-04 19:58 
GeneralRe: ImageList SizeMode ? Pin
geestje28-Dec-04 7:07
geestje28-Dec-04 7:07 
GeneralRe: ImageList SizeMode ? Pin
Heath Stewart28-Dec-04 7:11
protectorHeath Stewart28-Dec-04 7:11 
GeneralRe: ImageList SizeMode ? Pin
geestje28-Dec-04 7:20
geestje28-Dec-04 7:20 
GeneralRe: ImageList SizeMode ? Pin
Heath Stewart28-Dec-04 7:23
protectorHeath Stewart28-Dec-04 7:23 
GeneralC# Multiple forms... Pin
afrodriguez27-Dec-04 10:18
afrodriguez27-Dec-04 10:18 
GeneralRe: C# Multiple forms... Pin
DavidNohejl27-Dec-04 13:01
DavidNohejl27-Dec-04 13:01 
GeneralRe: C# Multiple forms... Pin
Matt Gerrans27-Dec-04 14:33
Matt Gerrans27-Dec-04 14:33 
GeneralRe: C# Multiple forms... Pin
afrodriguez27-Dec-04 15:24
afrodriguez27-Dec-04 15:24 
GeneralRe: C# Multiple forms... Pin
Matt Gerrans27-Dec-04 23:47
Matt Gerrans27-Dec-04 23:47 
GeneralRe: C# Multiple forms... Pin
Heath Stewart28-Dec-04 7:13
protectorHeath Stewart28-Dec-04 7:13 
GeneralRe: C# Multiple forms... Pin
afrodriguez27-Dec-04 15:21
afrodriguez27-Dec-04 15:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.