C/AL Code in SQL Database?

JustAnotherNavUserJustAnotherNavUser Member Posts: 7
Hello Gents,

I think I've searched around for this hard enough, but as of yet have not come across an answer.

When creating any code from within the NAV application I can only assume that this is stored within the SQL db running the application. Is this correct?

If this is correct could somebody please tell me where I might be access this code from with SSMS? The reason I'm asking is I'm trying to get some form of version control in place. What I was hoping to do was export each object as text then commit to my repository. This would then allow subsequent changes to committed and a revision history kept. It'll not be a problem doing this manually once the initial commits have taken place, but I don't fancy going through every NAV object manually for the first run.

However, there's obviously no EXPORTOBJECTS() method within < v2009 so I was hoping I could get the code from within the SQL db.

Any help would be much appreciated.

Thank you in advance guys,
Kind regards,
- JANU

Comments

  • krikikriki Member, Moderator Posts: 9,110
    It is stored in the BLOB in the object table. But it is not saved as plain text.

    BTW: Why re-invent the wheel? There are already some C/AL version control programs around.

    Search here:
    http://www.mibuso.com/productdir.asp
    http://www.mibuso.com/downloads.asp?category=none
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • JustAnotherNavUserJustAnotherNavUser Member Posts: 7
    kriki wrote:
    It is stored in the BLOB in the object table. But it is not saved as plain text.

    Found it. I'd obviously queried that table before before not knowing where I was looking I'd never added a 'WHERE' clause on to the end of my query, so the [BLOB Reference] column was always returning null for Type '0' (Table data, is it?)
    select top 1
    	convert( varchar(max), convert( varbinary(max), O.[BLOB Reference] )) as 'Object Source',
    from
    	dbo.[Object] O
    where
    	type = 1
    
    Returns something, but not plain text. Looks like I'll be opening VS to sort this.
    kriki wrote:
    BTW: Why re-invent the wheel? There are already some C/AL version control programs around.

    Search here:
    http://www.mibuso.com/productdir.asp
    http://www.mibuso.com/downloads.asp?category=none

    Thanks for the links, I'll be sure to have a look. To answer your question, there are quite a few:

    [*]It'll make it easier to transfer our objects amongst multiple sites (and multiple developers) not necessarily working on the same database.
    [*]It's not dependent on one specific NAV implementation.
    [*]We can commit anything else we like (read: need) into SVN
    [*]SVN will be integrated into the windows shell.
    And, most importantly,
    [*]It'll be a bit of fun!
  • krikikriki Member, Moderator Posts: 9,110
    And, most importantly,
    [*]It'll be a bit of fun!
    8)
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.