Note that there are some explanatory texts on larger screens.

plurals
  1. POApplication works perfect in debug mode but unexpected error when executed after publish
    primarykey
    data
    text
    <p>I've made a VB application for school. I've put a lot of time in it and I was so happy when I finally finished it. It works perfect in debug mode.</p> <p>Now the problem is: when I publish it, install it and execute it, I get errors when I open certain forms. What I noticed is that only the forms which have "<em>*</em>*.Datasource = " in their code produce these errors. (for example: <code>cbVertrekpunt.DataSource = getListofBstations()</code>)</p> <p>Original function for GridView DataSource:</p> <pre><code>Public Function getStation(ByVal station As String) As Station Return (From s In treinDataContext.Stations Select s Where s.naam = station).First End Function </code></pre> <p>Here's an error of one of the forms: first line in english: Sequence contains no elements</p> <pre><code>System.InvalidOperationException: Reeks bevat geen elementen bij System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) bij System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) bij System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) bij System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression) bij System.Linq.Queryable.First[TSource](IQueryable`1 source) bij TreinplannerBL.TreinController.getStation(String station) bij TreinplannerBL.RittenbeheerderController.getEindstationMogelijkMetBeginstation(String beginstation) bij RitController.AankoopTicket.cbVertrekpunt_SelectedIndexChanged(Object sender, EventArgs e) bij System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e) bij System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value) bij RitController.AankoopTicket.AankoopTicket_Load(Object sender, EventArgs e) bij System.Windows.Forms.Form.OnLoad(EventArgs e) bij System.Windows.Forms.Form.OnCreateControl() bij System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) bij System.Windows.Forms.Control.CreateControl() bij System.Windows.Forms.Control.WmShowWindow(Message&amp; m) bij System.Windows.Forms.Control.WndProc(Message&amp; m) bij System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m) bij System.Windows.Forms.Form.WmShowWindow(Message&amp; m) bij System.Windows.Forms.Form.WndProc(Message&amp; m) bij System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m) bij System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m) bij System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) </code></pre> <p>Extra information: I'm sure the problem lies within the fact that functions are datasources cause when I open forms in which no functions are datasources, I get no error. When I open forms which have ".DataSource = " I get errors, but when I delete these lines, the errors don't appear anymore</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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