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
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)
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.
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.
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
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)