Using Visual FoxPro free table in Combination with SQL Server Database


Using Visual FoxPro free table in Combination with SQL Server Database...
Author
Message
Elio Reyes
Elio Reyes
StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)
Group: Forum Members
Posts: 46, Visits: 251


I see the VFPStandAloneTable sample, I hope does everything this sample has, but my program does not work.



I have more table from different folder that I have to incorporate in the project but when my first.



Thanks SF

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hey Pedro.

Lets start checking your Data Source setting. In the AppMain.vb, you will find a "SetDataSources" sub. In there, you should manyally set your datasource for your free tables. Something like:

DataLayer.DataSources.Add(New VfpDataSourceItem("MyFreeTables", "Provider=vfpoledb.1;Data Source="C:\MyFolderWhereMyFreeTablesAre";Collating Sequence=general;"))

And if I understood what you said, you might have tables in different folders, so you could create differente datasource keys for each, and then map your BOs accordingly:

DataLayer.DataSources.Add(New VfpDataSourceItem("MyFreeTables2", "Provider=vfpoledb.1;Data Source="C:\MyOtherFolderWhereMyFreeTablesAre";Collating Sequence=general;"))

 


Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
And in your BOs properties sheet, don't forget to set the DataSourceKey too:


Elio Reyes
Elio Reyes
StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)
Group: Forum Members
Posts: 46, Visits: 251
Well, now I have this error "An error occurred while creating a new DataLayer for the business object."



Thanks SF
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Could you give us some more details?

A stack trace. Your DataLayer.DataSources.Add line also could help.

Elio Reyes
Elio Reyes
StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)
Group: Forum Members
Posts: 46, Visits: 251
Not... Thanks was my problem, I moved the sentence ConnectionManager.SetConnections() before create the DataLayer.



All is working fine ...



You Are Right... Like ever



Thanks very very Much SF

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
You Are Right... Like ever

Well, and you are completely wrong on this. BigGrin

But glad you got it working! Cool

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