Are you running the query in SQL Server 2005 or somewhere in your C# code?
I ran your code in a query on sql server 2008 and it created the table fine. Your syntax isnt at fault; does the table already exist? are you correctly connected to the sql server instance to run the query?
yes i am connected. All is fine because I already made some tables but when I create a column which has date data type, the date data type is not turning into a blue color, and I believe it means that it's not being recognize as a sql data type
I just tried to run the command in MS SQL Server Management Studio Express (2005). create table tbl (orderdate date)
It does not execute giving the Error:
Msg 2715, Level 16, State 7, Line 1
Column, parameter, or variable #1: Cannot find data type date.
Also, when I use the table designer the only date related types are DateTime and SmallDateTime.
Is this an SQL Express issue or a 2005 v. 2008 issue?
Use a DateTime and ensure that the time is always set to 00:00:00.
When reading/writing a value use the Date property:
Get myDateTime - SomeValue = myDateTime.Date; Set myDateTime - myDateTime = newDateTime.Date; Set to today - myDateTime = DateTime.Today;
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...