-
DateTime Type in SQL
I am running into a problem where we cannot use DateTime in SQL.
I have a field that I have called Date_Created and have set it to data type datetime. The field in auto populated on the page with the year and is Read Only. When you add the record nothing gets added. If I chance the field to char or nvarchar the record will be added with the date. But I want to use datetime.
Any ideas what could be causing this.
Thanks, Carl
-
DateTime Type in SQL (reply)
what you mean by "auto populated" ?
use the MS-SQL Northwind Employee table which has a datetime field as an example and post your code to illustrate your problem concerning datetime.
------------
Carl at 9/24/01 12:18:13 PM
I am running into a problem where we cannot use DateTime in SQL.
I have a field that I have called Date_Created and have set it to data type datetime. The field in auto populated on the page with the year and is Read Only. When you add the record nothing gets added. If I chance the field to char or nvarchar the record will be added with the date. But I want to use datetime.
Any ideas what could be causing this.
Thanks, Carl
-
DateTime Type in SQL (reply)
This is the code that I am using. If I make field number 5 a datetime nothing gets written to the record. If I make it a varchar it works.
<%
Set AER1DB = Server.CreateObject("ASP.db"
AER1DB.dbUnit = 101
ButtonCheck = Request("aspDBEditBut_101"
AER1DB.dbDSN = "DSN=XXXXX; UID=XX; PWD="
AER1DB.dbSQL = "SELECT * FROM ee_email"
AER1DB.dbMode = "Both"
AER1DB.dbNavigation = "Top"
AER1DB.dbNavigationIcon = "Std"
AER1DB.dbButtonsOnOff="EditCancelOff,FilterDro pOff,EditDropOff"
AER1DB.dbStartUp = "EditAdd"
AER1DB.dbEditHeader=false
AER1DB.dbImageDir = "../allied/images/"
AER1DB.dbNavigationItem = "Add"
AER1DB.dbColor = "CCCCCC,FFFFFF,04433A,Black,999999,,,,Black 4;
AER1DB.dbEditParams = _
"TableName=ee_email,BookMarkFlds=0,TableTag=Bo rder=1"
AER1DB.dbEditFlds = "1,2,3,4,5[timestamp(mm/dd/yy)]"
AER1DB.dbEditAddROFlds = "5"
AER1DB.dbButtonAnchor=false
AER1DB.ASPdb
%>
Carl
------------
Frank Kwong at 9/24/01 12:58:01 PM
what you mean by "auto populated" ?
use the MS-SQL Northwind Employee table which has a datetime field as an example and post your code to illustrate your problem concerning datetime.
------------
Carl at 9/24/01 12:18:13 PM
I am running into a problem where we cannot use DateTime in SQL.
I have a field that I have called Date_Created and have set it to data type datetime. The field in auto populated on the page with the year and is Read Only. When you add the record nothing gets added. If I chance the field to char or nvarchar the record will be added with the date. But I want to use datetime.
Any ideas what could be causing this.
Thanks, Carl
-
DateTime Type in SQL (reply)
This is the code that I am using. If I make field number 5 a datetime nothing gets written to the record. If I make it a varchar it works.
<%
Set AER1DB = Server.CreateObject("ASP.db"
AER1DB.dbUnit = 101
ButtonCheck = Request("aspDBEditBut_101"
AER1DB.dbDSN = "DSN=XXXXX; UID=XX; PWD="
AER1DB.dbSQL = "SELECT * FROM ee_email"
AER1DB.dbMode = "Both"
AER1DB.dbNavigation = "Top"
AER1DB.dbNavigationIcon = "Std"
AER1DB.dbButtonsOnOff="EditCancelOff,FilterDro pOff,EditDropOff"
AER1DB.dbStartUp = "EditAdd"
AER1DB.dbEditHeader=false
AER1DB.dbImageDir = "../allied/images/"
AER1DB.dbNavigationItem = "Add"
AER1DB.dbColor = "CCCCCC,FFFFFF,04433A,Black,999999,,,,Black 4;
AER1DB.dbEditParams = _
"TableName=ee_email,BookMarkFlds=0,TableTag=Bo rder=1"
AER1DB.dbEditFlds = "1,2,3,4,5[timestamp(mm/dd/yy)]"
AER1DB.dbEditAddROFlds = "5"
AER1DB.dbButtonAnchor=false
AER1DB.ASPdb
%>
Carl
------------
Frank Kwong at 9/24/01 12:58:01 PM
what you mean by "auto populated" ?
use the MS-SQL Northwind Employee table which has a datetime field as an example and post your code to illustrate your problem concerning datetime.
------------
Carl at 9/24/01 12:18:13 PM
I am running into a problem where we cannot use DateTime in SQL.
I have a field that I have called Date_Created and have set it to data type datetime. The field in auto populated on the page with the year and is Read Only. When you add the record nothing gets added. If I chance the field to char or nvarchar the record will be added with the date. But I want to use datetime.
Any ideas what could be causing this.
Thanks, Carl
-
DateTime Type in SQL (reply)
If you need help, you have to illustrate your problem using public sample DBs. It is not likely that anybody can look at your own code an tell you what's wrong with it - even if you are paying of the service.
------------
Carl at 9/24/01 6:07:04 PM
This is the code that I am using. If I make field number 5 a datetime nothing gets written to the record. If I make it a varchar it works.
<%
Set AER1DB = Server.CreateObject("ASP.db"
AER1DB.dbUnit = 101
ButtonCheck = Request("aspDBEditBut_101"
AER1DB.dbDSN = "DSN=XXXXX; UID=XX; PWD="
AER1DB.dbSQL = "SELECT * FROM ee_email"
AER1DB.dbMode = "Both"
AER1DB.dbNavigation = "Top"
AER1DB.dbNavigationIcon = "Std"
AER1DB.dbButtonsOnOff="EditCancelOff,FilterDro pOff,EditDropOff"
AER1DB.dbStartUp = "EditAdd"
AER1DB.dbEditHeader=false
AER1DB.dbImageDir = "../allied/images/"
AER1DB.dbNavigationItem = "Add"
AER1DB.dbColor = "CCCCCC,FFFFFF,04433A,Black,999999,,,,Black 4;
AER1DB.dbEditParams = _
"TableName=ee_email,BookMarkFlds=0,TableTag=Bo rder=1"
AER1DB.dbEditFlds = "1,2,3,4,5[timestamp(mm/dd/yy)]"
AER1DB.dbEditAddROFlds = "5"
AER1DB.dbButtonAnchor=false
AER1DB.ASPdb
%>
Carl
------------
Frank Kwong at 9/24/01 12:58:01 PM
what you mean by "auto populated" ?
use the MS-SQL Northwind Employee table which has a datetime field as an example and post your code to illustrate your problem concerning datetime.
------------
Carl at 9/24/01 12:18:13 PM
I am running into a problem where we cannot use DateTime in SQL.
I have a field that I have called Date_Created and have set it to data type datetime. The field in auto populated on the page with the year and is Read Only. When you add the record nothing gets added. If I chance the field to char or nvarchar the record will be added with the date. But I want to use datetime.
Any ideas what could be causing this.
Thanks, Carl
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|