I made this program on vbnet express 2012, using the built in data source, and when I deploy the program copying also the mdf file, the program won't work on the client machine. My client doesn't want to install SQL server on his machine, he only want to use simple program with simple database stored in a file next to the program. It was easy back in VB6 and access mdb files, but with the mdf files, it is just not working. I tried to create mdb file database, vbnet doesn't connect to it, I read that it needs to force the cpu to x86, so decided to forget about this option I also tried this option to connect to my mdf file
Public SQLCon As New SqlConnection With {.ConnectionString = "Data Source=.;Initial Catalog=" & Application.StartupPath & "\data.mdf;Integrated Security=True;"}
The program doesn't work, showing error : 40 - could not open a connection to SQL server.
Is there anyway simple to store data on a local database file in vbnet?