LLBLGen Pro 2.6 with SQL Server 2016

Posts   
1  /  2
 
    
Kaustubh
User
Posts: 4
Joined: 02-Mar-2017
# Posted on: 02-Mar-2017 14:49:26   

Hello,

Recently we have upgraded our SQL server from 2014 to 2016. But we are getting following exception in catalog refresh,

Message: ExecuteReader: CommandText property has not been initialized

Stacktrace: -----[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)

We are using LLBLGen Pro version 2.6.

Please let me know how can I update the sql driver for SQL Server 2016

Thanks in advance.

-Kaustubh

Walaa avatar
Walaa
Support Team
Posts: 14986
Joined: 21-Aug-2005
# Posted on: 03-Mar-2017 04:27:34   

You will need to modify the driver. You can find the source code at (Downloads-> v2.6-> extras section) in the "LLBLGen Pro SDK" package.

In code look for _majorSqlServerVersion, you will know what to do. Just add the 2016 version number and maybe the 2014 too.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39760
Joined: 17-Aug-2003
# Posted on: 03-Mar-2017 11:10:33   

... or upgrade to v5 which has support for 2016 built-in, including 2016 specific features wink

Frans Bouma | Lead developer LLBLGen Pro
Kaustubh
User
Posts: 4
Joined: 02-Mar-2017
# Posted on: 03-Mar-2017 12:12:41   

Yes Otis, we are planning to upgrade to v5. But meanwhile can you please share the link where I can download the source code that Walaa has suggested in his post. Or can you share the 2016 specific dll?

Regards, Kaustubh

Walaa avatar
Walaa
Support Team
Posts: 14986
Joined: 21-Aug-2005
# Posted on: 03-Mar-2017 13:42:49   

The path I described above is under "My Account/Downloads/v.2.6" You should sign in to the website using your CustomerID, then go to the following URL.

Here is a direct path, to this section of the downloads. http://www.llblgen.com/pages/secure/ListDownloads.aspx?ProductVersion=6

Kaustubh
User
Posts: 4
Joined: 02-Mar-2017
# Posted on: 14-Mar-2017 16:58:31   

Hello Otis and Walaa,

I have downloaded the sourcecode from link mentioned in last post, but the source code is not getting built. I am getting missing assembly reference error. Please find attached screenshot Missingdll.jpeg.

Also please let me know exactly what changes need to make in _majorSqlServerVersion, so that the dll will support SQL server 2014.

Looking forward to here from you as soon as possible.

Thanks in advance.

Regards, Kaustubh

Attachments
Filename File size Added on Approval
Missingdll.JPG 27,087 14-Mar-2017 16:58.42 Approved
Kaustubh
User
Posts: 4
Joined: 02-Mar-2017
# Posted on: 14-Mar-2017 17:59:56   

Hello Otis and Walaa,

I have resolved the missing assembly reference error by adding the ddls from LLBLGen Pro installation folder.

Now I am getting the following error, Error 43 Cryptographic failure while signing assembly 'd:\Projects\FurstPerson\FP_Shared_Folder\LLBLGenPro-v2.6-setup\LLBLGenProSDK_09132012\Sourcecode\Drivers\SqlServer\obj\Debug Demo\SD.LLBLGen.Pro.DBDrivers.SqlServerDBDriver.dll' -- 'Error reading key file 'C:\Myprojects\mystrongkey.key' -- The system cannot find the path specified. ' D:\Projects\FurstPerson\FP_Shared_Folder\LLBLGenPro-v2.6-setup\LLBLGenProSDK_09132012\Sourcecode\Drivers\SqlServer\CSC

Also please let me know what code level changes are required.

Regards, Kaustubh

Walaa avatar
Walaa
Support Team
Posts: 14986
Joined: 21-Aug-2005
# Posted on: 14-Mar-2017 18:06:41   

7,8,9,10....13 are the major version numbers as shown in the following blog post. https://sqlserverbuilds.blogspot.com.eg/ Just search the source code, and add extra conditions for the major version that you need.

(EDIT) Comment the signing code in the Open AssemblyInfo.cs

DG avatar
DG
User
Posts: 3
Joined: 16-Jun-2017
# Posted on: 16-Jun-2017 11:02:21   

Kaustubh wrote:

Yes Otis, we are planning to upgrade to v5. But meanwhile can you please share the link where I can download the source code that Walaa has suggested in his post. Or can you share the 2016 specific dll?

Regards, Kaustubh

We had the same problem, I changed the dll.

This attached dll works with LLBL gen v2.6 it's solves the commandtext not initialised error for MSSQL version 2016, 2012

just overwrite the attached dll: SD.LLBLGen.Pro.DBDrivers.SqlServerDBDriver.dll in folder: C:\Program Files (x86)\Solutions Design\LLBLGen Pro v2.6\Drivers\SqlServer

Then the error is gone. Good Luck

(edit) No binaries from 3rd parties allowed, sorry. -- Otis

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39760
Joined: 17-Aug-2003
# Posted on: 17-Jun-2017 09:46:17   

This is a bit of a catch 22: you attached a binary file, but it can contain anything, and as it's on our forums we are responsible for this and therefore can't let others download it. Attaching the source code however is prohibited, as it's not source that's open.

So if you want to share things, I think the best thing you can do is create a diff file with the changes made and attach that so others can apply that diff to the source they download from our website.

Frans Bouma | Lead developer LLBLGen Pro
priller
User
Posts: 28
Joined: 03-Feb-2011
# Posted on: 25-Apr-2018 16:26:39   

Can I get the SD.LLBLGen.Pro.DBDrivers.SqlServerDBDriver.dll emailed to me that works with SQL Server 2016 and 2.6 please? I can give you my customer id etc. Thanks

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39760
Joined: 17-Aug-2003
# Posted on: 25-Apr-2018 17:21:40   

No, as that driver doesn't exist. You have to adjust the driver source yourself.

Frans Bouma | Lead developer LLBLGen Pro
Saurabh095
User
Posts: 4
Joined: 21-Jun-2019
# Posted on: 21-Jun-2019 12:54:41   

Hello,

Recently we have upgraded our SQL server from 2008 to 2016. But we are getting following exception in catalog refresh,

Message: ExecuteReader: CommandText property has not been initialized

Stacktrace: -----[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)

We are using LLBLGen Pro version 2.6.

Please let me know how can I update the sql driver for SQL Server 2016 or can I get the SD.LLBLGen.Pro.DBDrivers.SqlServerDBDriver.dll emailed to me that works with SQL Server 2016 and 2.6 please?

Thanks in advance. Saurabh

Saurabh095
User
Posts: 4
Joined: 21-Jun-2019
# Posted on: 21-Jun-2019 13:03:20   

DG wrote:

Kaustubh wrote:

Yes Otis, we are planning to upgrade to v5. But meanwhile can you please share the link where I can download the source code that Walaa has suggested in his post. Or can you share the 2016 specific dll?

Regards, Kaustubh

We had the same problem, I changed the dll.

This attached dll works with LLBL gen v2.6 it's solves the commandtext not initialised error for MSSQL version 2016, 2012

just overwrite the attached dll: SD.LLBLGen.Pro.DBDrivers.SqlServerDBDriver.dll in folder: C:\Program Files (x86)\Solutions Design\LLBLGen Pro v2.6\Drivers\SqlServer

Then the error is gone. Good Luck

(edit) No binaries from 3rd parties allowed, sorry. -- Otis

Hello,

Can you please send me the dll for change

Thanks Saurabh

Walaa avatar
Walaa
Support Team
Posts: 14986
Joined: 21-Aug-2005
# Posted on: 21-Jun-2019 14:30:37   

This should be simple as explained above. Just get the source code and follow the couple of steps mentioned here.

Saurabh095
User
Posts: 4
Joined: 21-Jun-2019
# Posted on: 25-Jun-2019 10:10:43   

Hi Walaa,

I am using the trial version of the llblgenpro v5 and generating the entity class file but it is not creating the entity for the tables. please help me on this

Thanks Saurabh

pjoshidxt
User
Posts: 3
Joined: 25-Jun-2019
# Posted on: 25-Jun-2019 10:22:15   

I am also facing the same issue. Can someone help on this please? It has created DatabaseGeneric folder and under it (EntityClasses folder) but there is only one class file i.e CommonEntityBase.cs.

Walaa avatar
Walaa
Support Team
Posts: 14986
Joined: 21-Aug-2005
# Posted on: 25-Jun-2019 17:26:32   

pjoshidxt wrote:

I am also facing the same issue. Can someone help on this please? It has created DatabaseGeneric folder and under it (EntityClasses folder) but there is only one class file i.e CommonEntityBase.cs

That's a completely different subject, please create a new thread for it.

Vivek30
User
Posts: 33
Joined: 30-Jun-2016
# Posted on: 08-Jul-2019 12:35:58   

Hi,

I'm migrating from 2008 R2 to 2016. But when I'm creating new project and trying to connect, the llblgenpro is doing no action. I'm unable to see any items in "Catalogs found" grid and the "Create" button is disabled too. Is there a place where I can see the logs or anything else that is know while upgrading sql server from 2008 to 2016 using llblgenpro2.6

Regards, Vivek

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39760
Joined: 17-Aug-2003
# Posted on: 08-Jul-2019 14:57:36   

vs version doesn't have an influence. v2.6 is out of support anyway.

Frans Bouma | Lead developer LLBLGen Pro
Vivek30
User
Posts: 33
Joined: 30-Jun-2016
# Posted on: 08-Jul-2019 16:22:57   

I'm migrating from 2008 R2 to 2016. But when I'm creating new project(using llblgen pro designer) and trying to connect, the llblgenpro is doing no action. I'm unable to see any items in "Catalogs found" grid and the "Create" button is disabled too. Is there a place where I can see the logs or anything else that is know while upgrading sql server from 2008 to 2016 using llblgenpro2.6

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39760
Joined: 17-Aug-2003
# Posted on: 08-Jul-2019 16:48:24   

v2.6 doesn't work with sqlserver 2016 (v2.6 was released in 2008, 11 years ago, it has some unfortunate query construction where newer sqlserver versions don't work anymore. v3+ addresses that).

So you have to adjust the driver code yourself to make it work or upgrade to a later version of llblgen pro. THe latter is recommended as since v2.6 we made the runtime much much faster and added a lot of features you might need.

Frans Bouma | Lead developer LLBLGen Pro
DG avatar
DG
User
Posts: 3
Joined: 16-Jun-2017
# Posted on: 09-Jul-2019 09:40:01   

Otis wrote:

v2.6 doesn't work with sqlserver 2016 (v2.6 was released in 2008, 11 years ago, it has some unfortunate query construction where newer sqlserver versions don't work anymore. v3+ addresses that).

So you have to adjust the driver code yourself to make it work or upgrade to a later version of llblgen pro. THe latter is recommended as since v2.6 we made the runtime much much faster and added a lot of features you might need.

Actually this is not true, we are running LLBLGen 2.6 on SQL 2017 server, with compatibility mode 140, and this works fine. In the mean time we are porting our software to Entity Framework. Also I am tired that LLBLgen moderators not make the adapted DLL available for their customers.

Vivek30
User
Posts: 33
Joined: 30-Jun-2016
# Posted on: 09-Jul-2019 10:33:54   

DG and Otis many thanks. We are planning to upgrade llblgen pro to latest version for which I want to know the costing model.

In the interim I dont want to put a hard stop for our development work, so any help in adjusting the driver code to make this work for a month or so is what I am looking for. Can you guide me through so that I can give that a go? Just to me more clear the existing entities generated from llblgenpro 2.6 is successfully able to connect to sql server 2016, the problem is only when I try to refresh the .lgp file to get new schema the designer doesnt show any catalog.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39760
Joined: 17-Aug-2003
# Posted on: 09-Jul-2019 21:12:48   

DG wrote:

Otis wrote:

v2.6 doesn't work with sqlserver 2016 (v2.6 was released in 2008, 11 years ago, it has some unfortunate query construction where newer sqlserver versions don't work anymore. v3+ addresses that).

So you have to adjust the driver code yourself to make it work or upgrade to a later version of llblgen pro. THe latter is recommended as since v2.6 we made the runtime much much faster and added a lot of features you might need.

Actually this is not true, we are running LLBLGen 2.6 on SQL 2017 server, with compatibility mode 140, and this works fine.

That's the runtime. The driver doesn't work with sqlserver 2017. I know, because I wrote it.

In the mean time we are porting our software to Entity Framework. Also I am tired that LLBLgen moderators not make the adapted DLL available for their customers.

Well, if you want to move to entity framework instead of staying on a framework that has more features and is many times faster, that's of course your choice. However I don't see why we have to actively backport features to a version that's 11 years old? Do you backport features to your software that you wrote 11 years ago? I don't think so.

It's not hard though. We provide the sourcecode for this to our customers. If you really want to stay on an unsupported version that's 11 years old because you don't want to pay for a newer version and support, then you can adjust the driver yourself. Not many companies do that.

Frans Bouma | Lead developer LLBLGen Pro
1  /  2