Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL (Archived)

Getting Solomon .NET programming assistance? Manual? Help files?

Posted on by 260

We have a programmer who has done things in VBA with Dynamics SL, but now needs to use VBA and cannot figure out how to get the information he needs... here is his most recent quetions:

 "I am developing screen for MS SL 7 in VB.NET and I have a question
regarding retrieving a value from SL Database (Select statement or
stored procedure) back to custom application. What is the best way to do
this?
A little example would help a lot."

I posted this in the partner forum, but it did not show up, so they may not be maintaining that.


*This post is locked for comments

  • Toni Savage Profile Picture
    Toni Savage 260 on at
    Re: Re: Re: Re: Getting Solomon .NET programming assistance? Manual? Help files?

    Thanks!  That sounds like what he needs!!

  • Paul Phillips Profile Picture
    Paul Phillips 590 on at
    Re: Re: Re: Getting Solomon .NET programming assistance? Manual? Help files?

    Hi Toni,

    I think I understand what your developer is asking.

    There are two ways to work with data in the SDK. The first is to use a table buffer, which is a class that must inherit from SolomonDataObject. This is the version 7 replacement for dh files (still used on the VBA side). If you look in the VT module folder (assuming the SDK is installed) you can find all of the Solomon data object classes for the standard tables like you see for DH files. Both the SDOs and DH filed serve the same purpose - they are buffer containers for a database row. These are bound to the UI, or used unbound if desired. Sounds like your developer is already familiar with this.

    For unbound data that needs to be handled by SL, you can just create a standalone unbound SDO class in the project. It is a fair amount of work to create, but this data structure can then be used in the standard SQL API calls as a row buffer.

    If a single data value is needed, you can now use primitives directly instead of creating an SDO class. For example, if you just need to retrieve a count from a table, the following code will do it:

    Dim bCount As Integer

    Call sql(CSR_PJPROJ, "SELECT COUNT(project) FROM PJPROJ WHERE project=’abc’")serr1 = SGroupFetch1(CSR_PJPROJ, bCount)

    Note that bCount is a straight integer variable created on the fly - no need for a separate SDO class. Works the same for single string values. If you peek in the VBTools module for the SQLFetch calls you can see that primitives are allowed.

    In this example, no SQLCursorEx call was made for CSR_PJPROJ. For some reason SL didn't like it before SGroupFetch1 and would throw a 10202 error. There are a lot of quirks like that in the SDK.

     

    Hope this helps.

     

  • Toni Savage Profile Picture
    Toni Savage 260 on at
    Re: Re: Re: Re: Getting Solomon .NET programming assistance? Manual? Help files?

    I've tried to contact the person I think is in charge....
    I posted there but it never showed up, and now when i finally get to the page, it's empty!

  • pbrattin Profile Picture
    pbrattin 1,850 on at
    Re: Re: Re: Getting Solomon .NET programming assistance? Manual? Help files?

    Can you give a more concise description of what the objective is in obtaining the data?

    If he is not binding the data to controls on the screen, then he can use ADO.Net, which (IMHO) is 10 times easier and 15 times faster and 45 times more capable or he can define the buffer and use the VBTools methods shown in the previous posts. If he wants to use the VBTools method, he may want to read the manual some more to understand how they work.

    BTW, Toni, it's interesting that you noted that you posted it in the "new" partner forum, which does not now work anymore. We had a great partner forum that many people used. It gets killed for reasons not entirely explained to the partner community and the one that replaced it does not work. A great resource for solving partner problems was mysteriously taken away. WITHK's? Who makes these decisions?

     

  • Toni Savage Profile Picture
    Toni Savage 260 on at
    Re: Re: Getting Solomon .NET programming assistance? Manual? Help files?

    Thanks, Nagesh!

    But he answers: "yes, but... The problem is in bUserLevelAppr buffer virtual table where I know only one way in .NET to define a buffer size (is bind controls).  I do not want to do that.

    This returning value is strictly for some business logic and not to display "

     

     

  • Nagesh Boppana Profile Picture
    Nagesh Boppana 295 on at
    Re: Getting Solomon .NET programming assistance? Manual? Help files?

    HI Toni,

    He can use the same old SqlFetch() functions to get the data from  SL database in the VB.Net also.

     Exmple:

    SqlStr = "xsSPCGetUserLevel " & SParm(bpes.UserId) & PRMSEP & SParm(Trim(ChkStrg))

    serr1 = SqlFetch1(csr_UserLevelAppr, SqlStr, bUserLevelAppr)

    -Nagesh

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans