Ado connection to SQL Server Compact Edition 4.0?

Yes, you can connect to SQL CE 4 via ADO Set Cnxn = CreateObject("ADODB. Connection") Set cmd = CreateObject("ADODB. Command") strCnxn = "Provider=Microsoft.SQLSERVER.CE.OLEDB.4.0;" & _ "Data Source=C:\nw40.

Sdf;" Cnxn. Open strCnxn cmd. ActiveConnection = Cnxn cmd.

CommandText = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA. TABLES" While Not pRS. EOF WScript.

Echo pRS(0) pRS. MoveNext wend For password protected files, use: strCnxn = "Provider=Microsoft.SQLSERVER.CE.OLEDB.4.0;" & _ "Data Source=C:\nw40. Sdf;ssce:database password=secret.

Yes, you can connect to SQL CE 4 via ADO. Set Cnxn = CreateObject("ADODB. Connection") Set cmd = CreateObject("ADODB.

Command") strCnxn = "Provider=Microsoft.SQLSERVER.CE.OLEDB.4.0;" & _ "Data Source=C:\nw40. Sdf;" Cnxn. Open strCnxn cmd.

ActiveConnection = Cnxn cmd. CommandText = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA. TABLES" While Not pRS.

EOF WScript. Echo pRS(0) pRS. MoveNext wend For password protected files, use: strCnxn = "Provider=Microsoft.SQLSERVER.CE.OLEDB.4.0;" & _ "Data Source=C:\nw40.

Sdf;ssce:database password=secret.

This was my first source when I was looking for the connectionstring but non of them worked for version 4.0 – Yots Feb 14 at 19:49.

Try with the the following provider instead, saw somewhere it's being used with success: sCon = "Provider=Microsoft.SqlServer.Mobile.OleDb.3.0;Data Source=c:\temp\sqlcompact. Sdf;Password=testtest;" If no luck, can you create System DSN successfully? If so, create one then use it in the ASP code.

I had no luck with your connection string but if I use sCon = "Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=c:\temp\sqlcompact. Sdf;" I can connect now to a 4.0 database but only if the database is not encrypted – Yots Feb 15 at 11:18 @Yots that's weird.. I fear I have no experience in this so can't help very much. What about DSN?

Gave it a try? – Shadow Wizard Feb 15 at 12:05.

This works fine for me: classic ASP in Webmatrix and SQLServer CE.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions