Designer .NET crash LLBLGen 2.6

Posts   
 
    
Posts: 13
Joined: 03-Feb-2012
# Posted on: 22-Sep-2012 19:00:30   

Hi,

I recently upgraded to VS2012 and SQL Sever 2012 and have no problems at all. Until I tried to refresh the catalogue in the LLBLGen 2.6 designer. I get the following crash as soon as I press the "Retreive schema(s)" button:

ExecuteReader: CommandText property has not been initialized

-----[Core exception]-------------------- at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) at SD.LLBLGen.Pro.DBDrivers.SqlServer.SqlServerCatalogRetriever.RetrieveSchemas(String connectionString, IDBCatalog catalogToRetrieve, SchemaFetchFlags fetchFlags) at SD.LLBLGen.Pro.DBDrivers.SqlServer.SqlServerDBDriver.PopulateSelectedCatalogs(Hashtable callBacks, Hashtable connectionElements, SchemaFetchFlags fetchFlags, Hashtable properties) at SD.LLBLGen.Pro.Gui.Forms.MainWindow.RefreshCatalogs(Boolean unattended, Hashtable catalogsToRefresh) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Any ideas?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 23-Sep-2012 11:36:32   
Frans Bouma | Lead developer LLBLGen Pro
mikeyj1234
User
Posts: 1
Joined: 11-Oct-2012
# Posted on: 11-Oct-2012 12:10:54   

Hello- I, too, am on LLBLGen 2.6 and need to connect to SQL Server Express 2012. I followed the link above and downloaded the new file: SD.LLBLGen.Pro.DBDrivers.SqlServerDBDriver.dll (which actually says it's for 3.1) and get the error message below when I try to load my project file. Can anything be done? I just need to make some small changes to my project and don't really want to buy a new version simple_smile

Could not load file or assembly 'SD.LLBLGen.Pro.DBDriverCore, Version=3.1.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
-----[Core exception]--------------------
   at System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at SD.LLBLGen.Pro.ApplicationCore.DBDriverHelper.CreateDBDriverInstance(String assemblyFilename, String namespaceToUse, String className)
   at SD.LLBLGen.Pro.Gui.Forms.MainWindow.OpenExistingProject(String filenameToOpen)
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 11-Oct-2012 19:00:31   

Oh, sorry, my mistake! The v2.6 driver has to be adjusted for 2012. This is fairly easy, as the queries for 2008 can be re-used, it's just that some switch statements don't test for v11, and have case clauses up to v10 (2008 ).

I'll do this first thing tomorrow (friday), as it's 7PM now here. If you are in a real hurry, you can do it yourself with the Driver sourcecode downloaded from the customer area.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 11-Oct-2012 19:13:17   

As it's a 5 minutes job, I fixed it for you today. Hopefully I didn't miss any statements. Note: there's no 2012 specific logic in the driver nor the runtime of v2.6.

Attachments
Filename File size Added on Approval
SD.LLBLGen.Pro.DBDrivers.SqlServerDBDriver.dll 90,112 11-Oct-2012 19:13.23 Approved
Frans Bouma | Lead developer LLBLGen Pro
TogasPoon
User
Posts: 42
Joined: 09-Feb-2006
# Posted on: 15-May-2014 22:16:54   

I'm seeing the same error. I'm using LLBLGen 2.0 and need to update some old code. I tried downloading the latest drivers for 2.0 but am still seeing this error:

We did upgrade to SQL 2012 since I last refreshed.

ExecuteReader: CommandText property has not been initialized

-----[Core exception]-------------------- at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) at SD.LLBLGen.Pro.DBDrivers.SqlServer.SqlServerCatalogRetriever.RetrieveSchemas(String connectionString, IDBCatalog catalogToRetrieve, SchemaFetchFlags fetchFlags) at SD.LLBLGen.Pro.DBDrivers.SqlServer.SqlServerDBDriver.PopulateSelectedCatalogs(Hashtable callBacks, Hashtable connectionElements, SchemaFetchFlags fetchFlags, Hashtable properties) at SD.LLBLGen.Pro.Gui.Forms.MainWindow.RefreshCatalogs(Boolean unattended, Hashtable catalogsToRefresh) at SD.LLBLGen.Pro.Gui.Forms.MainWindow.RefreshAllCatalogs(Boolean unattended) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 16-May-2014 08:03:56   

Is there any change for you to update to v2.6?

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 16-May-2014 08:48:55   

The fix is only in the v2.6 driver and won't be backported to v2.0.

Frans Bouma | Lead developer LLBLGen Pro
Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 21-Jul-2015 22:56:00   

Hi,

I'm getting the same error when I try to refresh against sql server 2014.

Is there a way to get this to work?

Thanks

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 22-Jul-2015 07:55:07   

Fishy wrote:

Hi,

I'm getting the same error when I try to refresh against sql server 2014.

Is there a way to get this to work?

What LLBLGen version are you using?

David Elizondo | LLBLGen Support Team
Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 22-Jul-2015 16:25:06   

2.6 Also, I downloaded the most recent version of 2.6 driver.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 22-Jul-2015 18:05:15   

Would you please try the driver attached in this thread?

Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 22-Jul-2015 18:10:19   

Same results. cry

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 23-Jul-2015 07:26:44   

I can't reproduce it. I'm using v2.6 Final (October 9th, 2009) connecting to a SQLServer 11.0.3156.0 (which is 2012 SP1).

Please provide exact steps to reproduce the error, and the exact exception message and its stackTrace.

Does it happen when connecting locally/remotely? Does it happen with all schemas?

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 23-Jul-2015 09:25:57   

sqlserver 2014 isn't supported in v2.6 and won't be backported too. If you don't want to upgrade, you have to adjust the sql server driver code (it's in the 2.6 sdk download). It's not that difficult: the driver of 2.6 uses case statements based on the version number of the server to select the query to use, and it doesn't include the version of 2014 as 2.6 was released in 2008. It can use the 2005 query on 2014 just fine.

Frans Bouma | Lead developer LLBLGen Pro
Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 23-Jul-2015 17:11:10   

Thanks, I'll look on making those modifications.