Click here to Skip to main content
16,012,153 members
Home / Discussions / Database
   

Database

 
AnswerLDAP Pin
Ennis Ray Lynch, Jr.24-Aug-06 11:33
Ennis Ray Lynch, Jr.24-Aug-06 11:33 
QuestionHow to do a Select/Where x=NULL Pin
TheJudeDude24-Aug-06 11:09
TheJudeDude24-Aug-06 11:09 
AnswerRe: How to do a Select/Where x=NULL Pin
Colin Angus Mackay24-Aug-06 11:19
Colin Angus Mackay24-Aug-06 11:19 
GeneralRe: How to do a Select/Where x=NULL Pin
TheJudeDude24-Aug-06 11:25
TheJudeDude24-Aug-06 11:25 
AnswerRe: How to do a Select/Where x=NULL Pin
S Pandian25-Aug-06 22:37
S Pandian25-Aug-06 22:37 
QuestionProgramming SQL Database Question Pin
Jethro6324-Aug-06 10:11
Jethro6324-Aug-06 10:11 
AnswerRe: Programming SQL Database Question Pin
Colin Angus Mackay24-Aug-06 11:23
Colin Angus Mackay24-Aug-06 11:23 
GeneralRe: Programming SQL Database Question Pin
Jethro6327-Aug-06 21:22
Jethro6327-Aug-06 21:22 
Hi Colin. Thanks for your help.

I'm using SQL Desktop server at the moment, so it is difficult for me to try out SQL commands. In an effort to have some sort of proving ground for SQL commands, I use MS-Access and build queries in SQL mode. I realize that there are some differences between the two SQL implementations, but I am not a particularly advanced user and I don't often expect to run into the subleties too often.

Anyway, under Access, I was able to create a table using:

CREATE TABLE StationData;

This worked fine. I'll worry about creating the columns later.

I then attempted to use an SqlCommand object to execute the same statement against my SQL database under C#. I've run into problems here. I am getting SQL exceptions.

First of all, it is not clear to me if I can indeed execute a "CREATE TABLE" SQL statement using SqlCommand. Can I? Which method should I use? "ExecuteNonQuery", "ExecuteScalar"? None of these work.

So, at this point, I don't know if it is simply, my SQL syntax, or I am miss-using SqlCommand object, or if I simply cannot do this with an SqlCommand object.

Can you shed some light? Your help is greatly appreciated.
Cheers,
Mark
GeneralRe: Programming SQL Database Question Pin
Colin Angus Mackay27-Aug-06 21:51
Colin Angus Mackay27-Aug-06 21:51 
GeneralRe: Programming SQL Database Question Pin
Jethro6329-Aug-06 3:05
Jethro6329-Aug-06 3:05 
GeneralRe: Programming SQL Database Question Pin
Colin Angus Mackay29-Aug-06 11:23
Colin Angus Mackay29-Aug-06 11:23 
GeneralRe: Programming SQL Database Question Pin
Jethro6331-Aug-06 3:17
Jethro6331-Aug-06 3:17 
GeneralRe: Programming SQL Database Question Pin
Colin Angus Mackay31-Aug-06 8:49
Colin Angus Mackay31-Aug-06 8:49 
GeneralRe: Programming SQL Database Question Pin
Jethro6331-Aug-06 9:13
Jethro6331-Aug-06 9:13 
QuestionPage Performance Pin
Amit Kumar G24-Aug-06 7:41
Amit Kumar G24-Aug-06 7:41 
AnswerDon't recache the data Pin
Ennis Ray Lynch, Jr.24-Aug-06 10:35
Ennis Ray Lynch, Jr.24-Aug-06 10:35 
QuestionConnector/Net 5.0.0 and Attributes Pin
knoppis24-Aug-06 6:42
knoppis24-Aug-06 6:42 
GeneralImport Data Into SQL Server 2005 Express Pin
Bassam Abdul-Baki24-Aug-06 6:36
professionalBassam Abdul-Baki24-Aug-06 6:36 
GeneralRe: Import Data Into SQL Server 2005 Express Pin
Mike Dimmick24-Aug-06 12:19
Mike Dimmick24-Aug-06 12:19 
GeneralRe: Import Data Into SQL Server 2005 Express Pin
Bassam Abdul-Baki25-Aug-06 2:49
professionalBassam Abdul-Baki25-Aug-06 2:49 
QuestionHow do I write this query? Pin
netDeveloper24-Aug-06 1:00
netDeveloper24-Aug-06 1:00 
AnswerRe: How do I write this query? Pin
Colin Angus Mackay24-Aug-06 2:17
Colin Angus Mackay24-Aug-06 2:17 
Questionexport dataset to excel?? Pin
steven_wong23-Aug-06 23:21
steven_wong23-Aug-06 23:21 
QuestionStored Proc Error help. Pin
vipinpaliwal198023-Aug-06 21:04
vipinpaliwal198023-Aug-06 21:04 
AnswerRe: Stored Proc Error help. Pin
Navi1523-Aug-06 23:34
Navi1523-Aug-06 23:34 

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.