Access data copy


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
1) I'm trying to use the BOM to create BO on the access database, so far no luck (an earlier topic)




I guess that you are referring to connecting to your access database so that you can map a schema. My guess here is that you are just stuck at this point. In which case all you need to do is supply a standard OLEDB connection string. SF actually has an AccessDbDataSourceItem class that is pre-plumbed to communicate with an Access database. So this process should be relatively straight forward once connected. When you are trying to connect, you just need to use the connection wizard (use the ellipsis button on the right of the OleDB provider), select the Access from the drop down list, then select your MDB. That should be all that is required to connect.



2) Assuming I can create a BO and link it in, I'm not sure how, progamatically, I can connect to the Access database. My application allows me to point to the database so that I can pass its full filepath to a conncetion string. Do you need to supply the entire connection string or are there Strataframe fuctions that would obtain the Povider to which I can append the remainder of the string.




The StrataFrame DataBase Connection Wizard will actually handle this for you. The same wizard available to you at run-time is also used within the BO Mapper. So if you get through that connection hurdle it should make more sense as you would just need to create another RequiredDataSourceItem in the SetDataSources in your AppMain.vb or program.cs file.



3) What function should I use to add the database to the collection. I realise that I need to associate a predefined DataAccessKey to the connection which is carried onto the BO which will be used to obtain the data.




I assume that if you are going down this route you do not want to use the connection string wizard. In this case just supply a valid OLEDB connection string manually to the DataSources collection:



MicroFour.StrataFrame.Data.DataBasics.DataSources.Add(New AccessDataSourceItem("MyAccessDataSourceKey","MyAccess OLEDB Connection String"))


Ian Hammond
Ian Hammond
StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)
Group: Forum Members
Posts: 57, Visits: 277
Hi,

I am a little lost in the documentation, not being sure what I need to do in the following circumstance. I am trying to open an access daatabase so that I can copy the data to the defaulted sql server database which has a structure change. My points are as follows:

1) I'm trying to use the BOM to create BO on the access database, so far no luck (an earlier topic)

2) Assuming I can create a BO and link it in, I'm not sure how, progamatically, I can connect to the Access database. My application allows me to point to the database so that I can pass its full filepath to a conncetion string. Do you need to supply the entire connection string or are there Strataframe fuctions that would obtain the Povider to which I can append the remainder of the string.

3) What function should I use to add the database to the collection. I realise that I need to associate a predefined DataAccessKey to the connection which is carried onto the BO which will be used to obtain the data.

I would appreciate any help,

Many thanks

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search