Results 1 to 6 of 6

Thread: Can I distribute code generated access database for free?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2009
    Location
    B.C. Canada
    Posts
    206

    Can I distribute code generated access database for free?

    if i make an access database from scratch using vb6 code, can i distribute it with my application for free?

    Code:
    Dim objDBE, objADO
    Const dbVersion10 = 1
    Const dbVersion11 = 8
    Const dbVersion20 = 16
    Const dbVersion30 = 32
    Const dbVersion40 = 64
    
    
    
    Set objDBE = CreateObject("DAO.DBEngine.36")
    objDBE.CreateDatabase App.Path & "\DragAndDrop1.mdb", ";LANGID=0x0409;CP=1252;COUNTRY=0", dbVersion40
    Set objDBE = Nothing
    
    
    Set objADO = CreateObject("ADODB.Connection")
    objADO.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DragAndDrop1.mdb")
    objADO.Execute ("Create Table retailer(EasyFindLetter text(10), stock number, product_description text(255), upc text(50), cs_qty text(100), retailer_stock_number text(255), retailer_price Currency)")
    
    objADO.Close
    Set objADO = Nothing

  2. #2
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Can I distribute code generated access database for free?

    Yes, even if you create it in Access itself (as long as you own that)
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  3. #3
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Can I distribute code generated access database for free?

    There are no restrictions on distributing MDB files containing your own data. If such a file had Access items in it such as Access Forms, Queries, etc. they might require MS Access in order to use them though.

    Even an MDB you created using Access can be used.

    BTW: You don't need to use DAO to create a new empty MDB. You can use ADOX for this instead.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Dec 2009
    Location
    B.C. Canada
    Posts
    206

    Re: Can I distribute code generated access database for free?

    i will just use the one i created in access then. saves me about 2 hours or more of re-making a bunch of tables with indexes.


    Very Many Thanks.

  5. #5
    Frenzied Member
    Join Date
    Mar 2009
    Posts
    1,182

    Re: Can I distribute code generated access database for free?

    However, since you are using the createobject to instantiate your database objects, your program may fall short on a users machine if they do not have the required libraries. To ensure that MDAC is packaged with your system and installed correctly, add a reference to ado/dao, compile, and use the PDW to create an install package. Then you can remove them, the references that is, recompile your exe and use the files in the *.lst to either create a new cab with your new exe or to make sure inno/windows installer has the right files.



    Good Luck
    Option Explicit should not be an Option!

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Can I distribute code generated access database for free?

    Thread moved to 'Database Development' forum (the 'VB6' forum is only meant for questions which don't fit in more specific forums)

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