Note that there are some explanatory texts on larger screens.

plurals
  1. PORetrieving records from SQL Server CE [is anybody on this planet can solve this issue??]
    text
    copied!<p>I have included database in my project(at root).</p> <p>The connection string </p> <pre><code>Data Source=|DataDirectory|\TSM_DB.sdf;Password=xxx;Persist Security Info=True;Max Database Size=512 </code></pre> <p><code>TSM_DB.sdf</code> properties:</p> <ul> <li>Build Action = Content</li> <li>Copy to Output Directory = Copy if newer</li> </ul> <p>Dataset properties:</p> <ul> <li>Build Action = None</li> <li>Copy to Output Directory = Do Not Copy</li> </ul> <p><strong>My problem:</strong> </p> <p>When I try to insert data into the database it gets inserted to the database present in <strong>Debug folder</strong> and not in the database which is included in the project...</p> <p>And that’s why (obviously) my select statement does not find any record in the database (according to my connection string)...</p> <p>I think the query (code) is perfectly fine, but some sort of settings need be done.</p> <p>How do I solve this issue?</p> <p><strong>EDIT :</strong> </p> <p>Example Select Code (working : when connection string path is Absolute)</p> <pre><code>Try Dim cnt_temp Dim SQLquery As String Dim myConString As String = My.Settings.TSM_DBConnectionString con.ConnectionString = myConString SQLquery = "SELECT * FROM tbl_outward" Dim DA As SqlCeDataAdapter, Ds As New DataSet, Dtb As New System.Data.DataTable DA = New SqlCeDataAdapter(SQLquery, con) DA.Fill(Ds) Dtb = Ds.Tables(0) cnt_temp = Dtb.Rows.Count MsgBox(cnt_temp) con.Close() Catch ex As Exception MsgBox("Error..!", MsgBoxStyle.Exclamation) End Try </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload