Results 1 to 5 of 5

Thread: Posting class to the db

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2010
    Posts
    4

    Posting class to the db

    Hi everyone,
    I'm working on transfering some functionality form VB6 app to .NET c# application. I'm new to VB6 and I'd like to ask you for some help.

    I have some clases that are an entities or sth like that:
    Let say we have a class VATRate.cls with some properties.
    I'm trying to find a sql code (underyilng db is MSSQL 2000), that inserts data filled in a form to the db.
    After button click an instance of VATRate is created, properties are being set.

    Then an
    Code:
    Public Function post() As Boolean
    post = AA.post()
    End Function
    is being called and the the item is being inserted into db.
    AA is
    Code:
    Private AA As aaacceng.VATRate
    I'm looking for a code that would be responsible for sql insert into db table, but unfurtunately I cannot find it.
    Could you tell me if there's some functionality in VB6 that could make insert data from objects into db without knowing the sql code?

  2. #2

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2010
    Posts
    4

    Re: Posting class to the db

    Hi RhinoBull,
    Thank you very much for you responser regarding my post:
    http://www.vbforums.com/showthread.p...19#post3845019

    I followed your instructions, but unfortunately I was unable to find the solution. That's why I'm asking for your help.

    Inside of my form there is a method postinv() that fills the info of PorchaseInvoice object and then calls PurchaseInvoice.post() method on that object.
    Below you can see the PurchaseInvoice class, and the method post, where is no code accessing db. But the db is being accessed them as I checked and a lot of queries is being called then.

    I tried to find some kind of mapping (like entity framework in c#) between this cls object and db tables, but without success.
    Do you have an idea how does it work?

    There's Sheridan data control (probably it's grid, but I cannot view it in designer as I havn't valid license for it).

    Here's the PurchaseInvoice.cls file content.



    I'm looking forward to an answer.
    Last edited by jaceks; Jul 22nd, 2010 at 03:13 AM. Reason: removed code

  4. #4

    Thread Starter
    New Member
    Join Date
    Jul 2010
    Posts
    4

    Re: Posting class to the db

    I've checked with the SQL Server profiler what queries are generated when the method post is being called.
    There are some queries that I event couldn't find in vb6 project source code.

  5. #5

    Thread Starter
    New Member
    Join Date
    Jul 2010
    Posts
    4

    Re: Posting class to the db

    Ok I finally know what's going on there.
    The Class is just a wrapper arround another class from referenced dll. When it calls the post methodm the method inside of class from dll is being called and I've no source code for it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width