Replies To: Problem Tabel not created

Re: Problem Tabel not created

Are you positive your connection string is accurate? Next let's take a look at this

Dim cmd As SqlCeCommand = con.CreateCommand()

Why say that is equal to con.createcommand if you, shortly after, set it's value to that of the new sqlcommand?

Furthermore let's look at that cmd string. You don't want to use the + operator on strings. You can't add a string together. You can concatenate strings together but you can't physically add them. So it's best you use the & operator instead. I see a space at

create table CoolPeople (

You'll want to be very clear with your statements. I've known SQL statements to not work due to extra spaces like that, not sure why, but it happens. So let's change that into a

Now the NOT NULL constraints on your column identifiers isn't required to be capitalized as SQL isn't like that, but it's very good practice, and will help you create understandable, readable sql statements that you can debug if anything goes wrong.

If there are any other issues it is because of your connection string, I assure you. That or there is a problem with your instance of the sql server. Let me know how this works out.