Click here to Skip to main content
16,011,947 members
Home / Discussions / Database
   

Database

 
AnswerRe: Sql database access Pin
Stephen McGuire29-Aug-06 12:01
Stephen McGuire29-Aug-06 12:01 
GeneralRe: Sql database access Pin
sgeezee30-Aug-06 3:13
sgeezee30-Aug-06 3:13 
Questionsmalldatetime in datagrid Pin
TheJudeDude29-Aug-06 8:07
TheJudeDude29-Aug-06 8:07 
AnswerRe: smalldatetime in datagrid Pin
Stephen McGuire29-Aug-06 12:09
Stephen McGuire29-Aug-06 12:09 
GeneralRe: smalldatetime in datagrid Pin
TheJudeDude29-Aug-06 15:25
TheJudeDude29-Aug-06 15:25 
GeneralRe: smalldatetime in datagrid Pin
Stephen McGuire30-Aug-06 8:48
Stephen McGuire30-Aug-06 8:48 
GeneralRe: smalldatetime in datagrid Pin
TheJudeDude30-Aug-06 11:41
TheJudeDude30-Aug-06 11:41 
QuestionNeed Help with AUTO_INCREMENT Pin
Jethro6329-Aug-06 4:20
Jethro6329-Aug-06 4:20 
Greetings:

I am creating an SQL table programmatically using C#. I have set up my SqlCommand and I am using ExecuteNonQuery to execute the following SQL statement:

<br />
CREATE TABLE StationData (StnID INT NOT NULL AUTO_INCREMENT, Name CHAR(50), Province CHAR(20), Latitude FLOAT, Longitude FLOAT);<br />


This statement is throwing an exception and the exception message says: "Incorrect syntax near "AUTO_INCREMENT"".

If I remove the AUTO_INCREMENT specifier from the above statement, then the operation completes successfully and the table and columns are created as expected. It just seems to be that AUTO_INCREMENT specifier.

I have checked many similar example statements from various sources and I don't see anything wrong with what I have done here.

Any suggestions?
Thanks,
Mark
AnswerRe: Need Help with AUTO_INCREMENT Pin
Eric Dahlvang29-Aug-06 5:25
Eric Dahlvang29-Aug-06 5:25 
GeneralRe: Need Help with AUTO_INCREMENT Pin
Jethro6329-Aug-06 5:38
Jethro6329-Aug-06 5:38 
GeneralRe: Need Help with AUTO_INCREMENT Pin
Eric Dahlvang29-Aug-06 5:57
Eric Dahlvang29-Aug-06 5:57 
GeneralRe: Need Help with AUTO_INCREMENT Pin
Jethro6329-Aug-06 6:06
Jethro6329-Aug-06 6:06 
QuestionHow do i get SQL to output a smalldatetime in British date format? Pin
Red_Wizard_Shot_The_Food28-Aug-06 23:02
Red_Wizard_Shot_The_Food28-Aug-06 23:02 
AnswerRe: How do i get SQL to output a smalldatetime in British date format? Pin
Andrew Bleakley28-Aug-06 23:14
Andrew Bleakley28-Aug-06 23:14 
QuestionCopy Stored Procedure Pin
joshp121728-Aug-06 9:31
joshp121728-Aug-06 9:31 
AnswerRe: Copy Stored Procedure Pin
Elina Blank28-Aug-06 9:52
sitebuilderElina Blank28-Aug-06 9:52 
AnswerRe: Copy Stored Procedure Pin
Navi1528-Aug-06 19:24
Navi1528-Aug-06 19:24 
QuestionConncet To Table DBF - VB.net Pin
javad_200528-Aug-06 6:52
javad_200528-Aug-06 6:52 
AnswerRe: Conncet To Table DBF - VB.net Pin
Eric Dahlvang28-Aug-06 9:07
Eric Dahlvang28-Aug-06 9:07 
AnswerRe: Conncet To Table DBF - VB.net Pin
javad_200528-Aug-06 9:11
javad_200528-Aug-06 9:11 
GeneralRe: Conncet To Table DBF - VB.net Pin
Eric Dahlvang28-Aug-06 9:24
Eric Dahlvang28-Aug-06 9:24 
QuestionVB.NET SQL procedures to return values Pin
kakomalis28-Aug-06 1:59
kakomalis28-Aug-06 1:59 
AnswerRe: VB.NET SQL procedures to return values Pin
Navi1528-Aug-06 2:05
Navi1528-Aug-06 2:05 
AnswerRe: VB.NET SQL procedures to return values Pin
Eric Dahlvang28-Aug-06 3:46
Eric Dahlvang28-Aug-06 3:46 
GeneralRe: VB.NET SQL procedures to return values Pin
Not Active28-Aug-06 6:30
mentorNot Active28-Aug-06 6:30 

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.