Connect local database c# -


i want create empty local database inside project's folder , i've error:

an unhandled exception of type 'system.data.sqlserverce.sqlceexception' occurred in system.data.sqlserverce.dll

on line

conn.open(); 

i'm lost need do. idea causing this? tried few solutions - 1 of them...

sqlceconnection conn = null;  try {     conn = new sqlceconnection("data source = bd-avalia.sdf; password ='<asdasd>'");     conn.open();      sqlcecommand cmd = conn.createcommand();     cmd.commandtext = "create table cliente(id_cliente int identity not null primary key, nome varchar not null, password not null int)";     cmd.executenonquery(); } {     conn.close(); } 

the error: enter image description here

if debug code (or output somehow) can check nativeerror property of sqlceexception, should tell cause of exception.

see http://technet.microsoft.com/en-us/library/aa237948(v=sql.80).aspx explanation of code.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -