473,473 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help, im new to MSSQL

-- =============================================
-- Create table with IDENTITY column
-- =============================================

create table logviewer
(
idLog smallint IDENTITY(1, 1),
timeLog, Char(14) NOT NULL,
dateLog, Char(14) NOT NULL,
typeLog, Char(14) NOT NULL,
adressLog, Char(90) NOT NULL,
messageLog, Char(254) NOT NULL
)
Server: Nachr.-Nr. 173, Schweregrad 15, Status 1, Zeile 8
Die Definition für die timeLog-Spalte muss einen Datentyp enthalten.

eng. define timLog colom as datatype

Could anyone help me please?
Jul 23 '05 #1
3 1132
Get rid of the commas after field name. Should look like this:

timeLog char(14)......

"XunLing" <xu*****@gmail.com> wrote in message
news:90**************************@posting.google.c om...
-- =============================================
-- Create table with IDENTITY column
-- =============================================

create table logviewer
(
idLog smallint IDENTITY(1, 1),
timeLog, Char(14) NOT NULL,
dateLog, Char(14) NOT NULL,
typeLog, Char(14) NOT NULL,
adressLog, Char(90) NOT NULL,
messageLog, Char(254) NOT NULL
)
Server: Nachr.-Nr. 173, Schweregrad 15, Status 1, Zeile 8
Die Definition für die timeLog-Spalte muss einen Datentyp enthalten.

eng. define timLog colom as datatype

Could anyone help me please?

Jul 23 '05 #2
DH

"XunLing" <xu*****@gmail.com> wrote in message
news:90**************************@posting.google.c om...
-- =============================================
-- Create table with IDENTITY column
-- =============================================

create table logviewer
(
idLog smallint IDENTITY(1, 1),
timeLog, Char(14) NOT NULL,
dateLog, Char(14) NOT NULL,
typeLog, Char(14) NOT NULL,
adressLog, Char(90) NOT NULL,
messageLog, Char(254) NOT NULL
)
Server: Nachr.-Nr. 173, Schweregrad 15, Status 1, Zeile 8
Die Definition für die timeLog-Spalte muss einen Datentyp enthalten.

eng. define timLog colom as datatype

Could anyone help me please?


Too many commas. Check the syntax of the "create table" command more
carefully.

This should work:

create table logviewer
(
idLog smallint IDENTITY(1, 1),
timeLog Char(14) NOT NULL,
dateLog Char(14) NOT NULL,
typeLog Char(14) NOT NULL,
adressLog Char(90) NOT NULL,
messageLog Char(254) NOT NULL
)

By the way, I'm always suspicious of "time" and "date" columns which end up
typed as something other than datetime or at least some sort of workable
numeric. And unless every addresslog attribute is going to be very close to
90 characters, I'd stronly suggest you switche to varchar. Ditto for your
messagelog attribute.

And do you realize that your smallint idlog attribute will be exhausted
after you insert 32767 rows or thereabouts?
Jul 23 '05 #3

"XunLing" <xu*****@gmail.com> wrote in message
news:90**************************@posting.google.c om...
-- =============================================
-- Create table with IDENTITY column
-- =============================================

create table logviewer
(
idLog smallint IDENTITY(1, 1),
timeLog, Char(14) NOT NULL,
dateLog, Char(14) NOT NULL,
typeLog, Char(14) NOT NULL,
adressLog, Char(90) NOT NULL,
messageLog, Char(254) NOT NULL
)
Server: Nachr.-Nr. 173, Schweregrad 15, Status 1, Zeile 8
Die Definition für die timeLog-Spalte muss einen Datentyp enthalten.

eng. define timLog colom as datatype

Could anyone help me please?


Remove the commas from between the column name and the type.

Good Luck,
Jim
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Darren | last post by:
Hi wondering if anyone can help. What i'm trying to do is get a company from a MSSQL database with the COMPANYNO which is a 'uniqueidentifier'. Then with this COMPANYNO I want to reference it to...
11
by: badz | last post by:
Hi frenz Lately I try to use MSSQL and PHP , the problem arise when PHP try to read MSSQL field with 'image' data type, header("Content-type: image/jpeg"); // act as a jpg file to browser I...
2
by: bigoxygen | last post by:
Hi. I am experiencing problems connecting to MSSQL. I'm not sure where to begin looking for the problem. I don't know if the problem is originating with PHP or MSSQL What should the host name...
1
by: Houston | last post by:
I have been able to get several basic databases to function both in playing around and functional ones on the web but they have all been pretty simple. I am now trying to develop a database for the...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.