lprun has exception NullReferenceException, Query in windows run as expected
Hi,
I run an LINQPad SQL query (lin2db provider) without any issues. If I try to run the same query with LPRUN.exe (Batch-File) I get a NullReferenceException. Mere snippets (without LINQ SQL) work fine for both LINQPad and LPRUN.exe.
Other LINQ SQL queries with linq2db provider have the same behavior. I tried with: sql2db provider for SQL Server and ACCESS.
I tried LINQ SQL with one of the samples with Microsoft SQL provider and it works fine.
Any idea?
Thanks a lot and best regards,
Helmut
NullReferenceException: Object reference not set to an instance of an object.
at LinqToDB.LINQPad.DriverHelper.<>c__DisplayClass2_0.b__0(TraceInfo info) in C:\projects\linq2db-linqpad\Source\DriverHelper.cs:line 211
at LinqToDB.Data.DataConnection.ExecuteReader(CommandBehavior commandBehavior) in c:\projects\linq2db\Source\Data\DataConnection.cs:line 838
at LinqToDB.Data.DataConnection.LinqToDB.IDataContext.ExecuteReader(Object query) in c:\projects\linq2db\Source\Data\DataConnection.Linq.cs:line 264
at LinqToDB.Linq.Query`1.d__12.MoveNext() in c:\projects\linq2db\Source\Linq\Query.cs:line 411
at LinqToDB.Linq.Query`1.
I run an LINQPad SQL query (lin2db provider) without any issues. If I try to run the same query with LPRUN.exe (Batch-File) I get a NullReferenceException. Mere snippets (without LINQ SQL) work fine for both LINQPad and LPRUN.exe.
Other LINQ SQL queries with linq2db provider have the same behavior. I tried with: sql2db provider for SQL Server and ACCESS.
I tried LINQ SQL with one of the samples with Microsoft SQL provider and it works fine.
Any idea?
Thanks a lot and best regards,
Helmut
NullReferenceException: Object reference not set to an instance of an object.
at LinqToDB.LINQPad.DriverHelper.<>c__DisplayClass2_0.b__0(TraceInfo info) in C:\projects\linq2db-linqpad\Source\DriverHelper.cs:line 211
at LinqToDB.Data.DataConnection.ExecuteReader(CommandBehavior commandBehavior) in c:\projects\linq2db\Source\Data\DataConnection.cs:line 838
at LinqToDB.Data.DataConnection.LinqToDB.IDataContext.ExecuteReader(Object query) in c:\projects\linq2db\Source\Data\DataConnection.Linq.cs:line 264
at LinqToDB.Linq.Query`1.d__12.MoveNext() in c:\projects\linq2db\Source\Linq\Query.cs:line 411
at LinqToDB.Linq.Query`1.
Comments
I've modified LINQPad to assign a null writer in this scenario, so hopefully this will fix the problem. You can download the new beta here:
http://www.linqpad.net/download.aspx#beta
Let me know how you get along.
Thanks a lot. It works fine.
Best regards,
Helmut