CREATE TABLE.... Short date field...
VB Code:
Dim sql As String
sql = "create table [Visits2]"
sql = sql & "("
sql = sql & "[sDate] Date,"
sql = sql & "[Session] Text(1),"
sql = sql & "[Visitors] Memo"
sql = sql & ")"
ConnOBData.Execute sql
it works, but need my sDate field to be a shortdate field...
how do i set that? Cheers. :)
Re: CREATE TABLE.... Short date field...
Not every database supports that format. Why do you need anyway? A date type is a date any way you look at it so you can always format the output...
Re: CREATE TABLE.... Short date field...
VB Code:
'Assuming MS SQL Server
'This works in MS SQL Server
Dim sql As String
sql = "create table [Visits2]"
sql = sql & "("
sql = sql & "[sDate] [COLOR=Green]smalldatetime[/COLOR],"
sql = sql & "[Session] Text(1),"
sql = sql & "[Visitors] Memo"
sql = sql & ")"
ConnOBData.Execute sql
Re: CREATE TABLE.... Short date field...
ah, knew there was something i was forgetting...
its ms access database im using... smalldatetime doesnt work. :(
want to store it as small as possible [im assuming if the field is set to short date the time will be dropped. and therefore take less space? :)]
all i need to deal with is the DATE... why bother with the time if i aint gotta :)
Re: CREATE TABLE.... Short date field...
Oh also, just realised, HOW can i make sDate & Session a compound key with the sql statement?