TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Tim Borowsky
NA
7
4.8k
Using C# to create table in SQLCE database with date for nam
Aug 5 2014 3:08 PM
Hello,
I'm trying to write an app that allows the user to select a date, and then create a table with that date's name (i.e. 8/5/2014), but the SQL query doesn't like the numbers being used.
cmd = new SqlCeCommand("CREATE TABLE " + dateTimePicker1.Value.Date.ToShortDateString()
+ " (Foo_ID NVARCHAR(20), FooData NVARCHAR(20))",
Conn);
Any suggestions? I'd rather not use a switch-case that spells out month/date/year, as that can get tedious.
Thanks!
Reply
Answers (
2
)
Split xml file
C# Windows form Application