jeyaseelan534327

Hullo,

I'm using windows ce 5.0 emulator(by VB.Net), i want to access sql database engine data from windows ce5.0 (my database name is Sample.mdf)

is this possible

If possible then pls give me the code coonection with sql database.

if it's not possible then pls give me any other solution.




Re: Smart Devices General How to access Sql database(.mdf format database) from windows ce5.0

jeyaseelan

Hullo,

I'm using windows ce 5.0 emulator(by VB.Net), i want to access sql database engine data from windows ce5.0 (my database name is Sample.mdf)

is this possible

If possible then pls give me the code coonection with sql database.

if it's not possible then pls give me any other solution.






Re: Smart Devices General How to access Sql database(.mdf format database) from windows ce5.0

Ilya Tumanov

No, it is not possible to open MDF files on devices because there¡¯s no SQL Server 2000/2005 on devices.

If you need a local database on device then use SQL CE instead ¨C database would be in SDF file. You also can connect to SQL Server 2000/2005/Express (running on desktop) remotely assuming your server and database are configured for remote access.

You could use data designers to create SDF database and access it. Same with remote SQL Server support, works the same was as with desktop.






Re: Smart Devices General How to access Sql database(.mdf format database) from windows ce5.0

Ilya Tumanov

Please do not cross post. Merging¡­




Re: Smart Devices General How to access Sql database(.mdf format database) from windows ce5.0

Jeyaseelan

Thanks for ur nice information,

Now i create a sql mobile database name as MobileDb.sdf, with one table name as Test1 with 2 fields(name and age), the same type of table is also in my sample.mdf datbase table name as DbeTest, now i want to insert the record to Test1 , on the execution time i'll give some data, and execute it, there is no error occured, but i restart my application then previously entered record was not found, the same pbm was also came for update statement . y this pbm is occured and how to solve this pbm(any sample code let me know ). please help me....it's my urgent task... here with i attached my sample code

Shared Function LoginValidationData(ByVal name As String, _

ByVal age As String) As Boolean

Try

Dim _Query As String = "Insert Into Test1 name,age Values( ' " & name& " ' , ' " & age& " ' ) "

scmd = New SqlCeCommand(_Query, SqlConnectionOpenDA.LoginCon)

scmd.ExecuteNonQuery()

Return True

Catch ex As Exception

Throw ex

End Try

End Function

thank you






Re: Smart Devices General How to access Sql database(.mdf format database) from windows ce5.0

Ilya Tumanov

See this.