.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

SQL Compact 4.0 OLE DB

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :

I'm trying to access the Nortwind.sdf db using the examples in the SQL Server Compact 4.0 Books OnLine and can not get past this statement to get a 'session pointer'.

IDBProperties* pIDBProperties;

hr = pIDBProperties->QueryInterface(IID_IDBCreateSession, (


**) &pIDBCrtSession);

The response is always E_NOINTERFACE.  I've successsfully completed the following steps:

CoCreateInstance & set the properties for 'pIDBInitialize-> ', gotten the pIDBProperties pointer & set its properties and then the error when querying pIDBProperties for the session pointer.

I'm using VS2010 on WIN7, x64 PC.

Any help would be a

View Complete Post

More Related Resource Links

Bar Code Scanners with the .NET Compact Framework

Summary: Learn how to make your applications use bar code scanners in a generic way-ndependent of the specific bar code scanners that are used on different devices. Using the design patterns Façade and Factory, the implementation not only supports multiple bar code scanners, but it also makes it easy to add support for other bar code scanners. After a brief discussion about bar code scanners and the bar code scanner pattern, a download code sample, written in C#, demonstrates the use of the pattern and technologies.

Serial Communication with the .NET Compact Framework

Learn how to make your applications communicate over a serial port and how to handle common issues when implementing serial solutions. After a general discussion about serial communication and a common serial communication standard, this article demonstrates a practical use of the technologies through sample source code written in C#.

Mobile WCF: Write an IM App with the .NET Compact Framework


The .NET Compact Framework 3.5 provides a subset of Windows Communication Foundation (WCF) functionality that you can harness to communicate between Windows Mobile devices and desktop PCs. We'll show you how.

Andrew Arnott

MSDN Magazine Launch 2008

Graphics To Go: Make A Mobile Imaging App With The .NET Compact Framework 2.0


This article focuses on developing for Pocket PCs, a skill which can then be transferred to Smartphone application development.

Rob Pierry

MSDN Magazine December 2006

Mobility: Optimize Your Pocket PC Development with the .NET Compact Framework


The .NET Compact Framework can be used to write great code and great applications. As long as you take a few things into consideration and are willing to bend a rule or two, you can have your performance cake and eat it too. In this article the authors present some neat tricks to make life as a programmer easier when using the .NET Compact Framework. Later they discuss techniques to increase performance, and decrease both load time and memory footprints. Sample code is provided.

Dave Edson and John Socha-Leialoha

MSDN Magazine December 2004

Mobility: Add Keyboard Support to Compact Framework Apps by Trapping Windows Messages


The Compact Framework Control class doesn't provide direct access to Windows messages. However, with P/Invoke, a few lines of native code, and the Compact Framework MessageWindow class, it's still possible to access underlying Windows messages. This can be used to work around any .NET Framework features, including keyboard support, that are not included in the Compact Framework.

Alan Pulliam

MSDN Magazine April 2004

Go Mobile: Create Compact, Robust Mobile Apps with SQL Server CE 2.0 and the .NET Compact Framework


Developers have myriad options when it comes to creating solutions for mobile devices. One of the greatest challenges facing mobile developers is finding a compact yet robust local storage solution. SQL Server CE 2.0 promises to deliver on both fronts. This new release represents a tremendous leap in terms of features and performance over its predecessor. This article will review some of the platform and tools choices developers have today. The authors will compare and contrast the significant new features in SQL Server CE 2.0 with the previous release. Following that, they will build a sample app for illustration.

Mark Brown and David Meunier

MSDN Magazine January 2003

Windows CE: Develop Handheld Apps for the .NET Compact Framework with Visual Studio .NET


Smart Device Extensions (SDE) for Visual Studio .NET allow programmers to develop applications for the .NET Compact Framework, a new platform that maintains many of the features of the .NET Framework in a version optimized for handheld devices. This article shows how SDE provides access through Visual Studio .NET to a variety of .NET classes for devices running Windows CE, including classes for creating user interfaces. Data access classes and Web Services for the .NET Compact Framework are also explained. Following that overview, a sample Web Service called XMLList is built. Then the UI-the XMLList client-side application-is created.

Larry Roof

MSDN Magazine March 2002

Getting Started with SQL Server Compact 4.0 and ASP.NET 4

The article Getting Started with SQL Server Compact 4.0 and ASP.NET 4 was added by tmorton on Monday, August 09, 2010.

While professional developers are waiting for the Visual Studio Tools and Designers for SQL Server Compact 4.0, I will show how impatient developers can include SQL Server Compact with ASP.NET applications, and use it from ASP.NET pages. Previously, you

Symmetric Key Encryption on the Compact Framework

There are two main types of encryption algorithms available within the .NET Compact Framework - symmetric and asymmetric encryption. This blog entry will discuss how to utilise symmetric key encryption, but first we have to outline the difference between Symmetric and Asymmetric encryption (I will discuss asymmetric key encryption in a future blog entry).

Symmetric and Asymmetric Key Encryption
Symmetric encryption algorithms (also known as ciphers) process plain text with a secret encryption key to create encrypted data (called cipher text). The same secret key is used to decrypt the cipher text back to plain text.

Asymmetric encryption (also known as public-key encryption) is a cryptography technique that uses public and private key pairs to encrypt and decrypt data respectably. The private key is a closely guarded secret, while the public key can be freely distributed over untrusted networks. You do not worry who has your public key (you could print it on a 100foot tall banner if you so desired), but you must keep your private key secret.

Redistribution of .net Compact FrameWork

Hi Every One, I Have a One Problem and need the expert Suggestion I have Developed Window Application Using VsStudio .Now In need to Deploy it on the Client P.c .So i Need to install the .net framework on the client p.c.It's going Fine I have deployed my Application successfully.BUt .net frame work tyaking too much time in installing on the client p.c is it possible to me to involve the compact .net framework in my installer project and redistribute it so that it can take less time and The deployement become more faster.. With Regards Thanx in advance

Creating a recordset using VBA in Excel with SQL Server Compact

I have create a SQL Server Compact database from VBA in Excel.  So far so good.  Now I want to access the database via a recordset.  here is my code.        Set recSet = New ADODB.Recordset        recSet.LockType = adLockBatchOptimistic     recSet.CursorType = adOpenKeyset     Call recSet.Open("SELECT * FROM SPAR", dbConn)   When I run this I get and error in Call recSet.Open("SELECT * FROM SPAR", dbConn):Errors Occurred, [,,,,]  I have search many forums about his problem, but I still can't see where the error is from.  I am using Excel 2003, and SQL Server Compact 3.5   Regards, Peter

ODBC Driver for SQL Server Compact Edition

I know that there is no ODBC driver available for SQL Server Compact Edition version 3.5.  Do you plan to add an ODBC driver in future release? If yes, is it high in your priority list?   The scenario why I am looking for an ODBC driver is to connect an MS Access application to a SDF file instead of MDB file.  This will enable me to easily sync the SDF file with SQL server repository using the new Data Sync Services.   Mario Cardinal MVP Solutions Architect

SQL Server Compact 4 replication library bug ?

I get the subscriber connection string from a SqlCeReplication object like so: public string GetFullConnectionString(string connectionString) { using (SqlCeReplication repl = new SqlCeReplication()) { repl.SubscriberConnectionString = connectionString; return repl.SubscriberConnectionString; } } With a connection string of: "Data Source=C:\data\nw(40).sdf" I get this from 3.5.8081: ssce:default lock timeout="5000";data source="C:\Data\nw.sdf";ssce:max database size="256";ssce:max buffer size="4096";ssce:temp file max size="256";ssce:enlist="True";ssce:default lock escalation="100";ssce:autoshrink threshold="60";ssce:flush interval="10"; But I get this from 4.0 CTP 1: "Autoshrink Threshold=\"60\";Case Sensitive=\"False\";Data Source=\"C:\\data\\nw40.sdf\";Default Lock Escalation=\"100\";Default Lock Timeout=\"5000\";Encrypt Database=\"False\";Encryption Mode=\"\";Enlist=\"True\";Mode=\"Read Write\";Flush Interval=\"10\";Locale Identifier=\"-1\";Max Buffer Size=\"4096\";Max Database Size=\"256\";Password=\"\";Persist Security Info=\"False\";Temp File Max Size=\"256\";Temp File Directory=\"

SQL Server Compact loses change tracking anchors when copied to device

I have a device app that use SQL Compact and uses sync framework to synchronize to a SQL Server 2008 instance.  In order to speed up the initial synchronization of my device app, I'm creating the database (.sdf) using the sync framework on the server based on the suggestion in this article: http://msdn.microsoft.com/en-us/library/dd938879.aspx#HandlingInitialSynchronizationandExpiredSubscriptions Then I get it via a WCF service down to the device app.  I'm able to download the db and it has data.  When I sync however, the database doesn't seem to think it is syncronized.  It seems to have lost it's anchors.   The following code returns an anchor for my State table on the server, but not after copying it to the device. Any suggestions are appreciated.  Thanks FPASQLCeClientSyncProvider).GetTableReceivedAnchor("State")

Windows Mobile - Visual Studio 2008 - Erro gravar no banco SQL compact 3.5

Boa noite estou tentando gravar em um banco de dados Compact 3.5 com o  código abaixo. Public Conexao As New SqlCeConnection("Data Source =" & (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) & "\banco.sdf;"))         Dim command As SqlCeCommand = Conexao.CreateCommand()         Conexao.Open()         Dim Trans As SqlCeTransaction = Conexao.BeginTransaction()         command.CommandText = "INSERT INTO clifor (nom, data, numero)VALUES (?, ?, ?)"                command.Parameters.Add("@nom", txtNome.Text)         command.Parameters.Add("@data", txtData.Text)         command.Parameters.Add("@numero", txtNumero.Text)         command.Prepare()         Trans.Commit(CommitMode.Immediate)         command.ExecuteNonQuery()         command.Dispose()         Conexao.Close()
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend