Pertti Karjalainen
|
|
Group: Forum Members
Posts: 54,
Visits: 4K
|
Trent L. Taylor (12/12/2006)
Perrti, We are always willing to listen to our users and improve our product. Additionally, it is not our desire to spar with you over help topics. If you feel something is missing within the help, we have a "Send Comments" link at the top right of every page to allow you to provide feedback. Also, the word DataSourceKey does actually appear a number of times within the help topic. Try searching on SecurityDataSourceKey and you will see all of the topics. No, I'm not looking to spar at all, at times I get just a bit frustrated is all. You guys are certainly very helpful and prompt with helpful answers & handholding. Maybe a part of the problem also is my help file ("Strataframe 1.5.1") -- I see no references whatsoever to SecurityDataSourceKey in Index or Search. Be that as it may, I will move forward and try to not bug you, at least too much. I feel that I have climbed most of the learning curve now, and I am actually becoming productive , slowly but surely... Thanks for all your help! Pertti
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
If I may suggest, someone over there should create a web app from the very beginning, in C# and VBNet, using both SQL server and VFP data, and write down every last pertinent detail on every single step. We have created a great many web applications using the framework (in both VB.NET and C#). Many of the hurdles you have been trying to overcome are not SF related but simply having a broad understanding of web applications in .NET....which just comes with time and effort as you have been contributing. As for the VFP tables, there is no reason for us to create a web sample in this respect as it is identical to doing something from the WinForms point of view. As you have learned, we are more than willing to help and we in fact created and posted the C# web sample in the forum specifically for you so you could get started.
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
Perrti, We are always willing to listen to our users and improve our product. Additionally, it is not our desire to spar with you over help topics. If you feel something is missing within the help, we have a "Send Comments" link at the top right of every page to allow you to provide feedback. Also, the word DataSourceKey does actually appear a number of times within the help topic. Try searching on SecurityDataSourceKey and you will see all of the topics.
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
We will get a Getting Started tutorial done on the webforms side that matches what the VB.NET tutorial does. You also might look at the training videos from http://www.stratatrain.com... they contain almost all of the details that you're looking for.
|
|
|
Pertti Karjalainen
|
|
Group: Forum Members
Posts: 54,
Visits: 4K
|
Well, the help file at least I have is almost totally unhelpful on this topic. Your instructions earlier in this message topic is what should be in there. The word "Datasourcekey" doesn't appear anywhere in the help file, not even in the GLOBAL.ASAX -topic. Also, linked help topics Setting Data Sources Manually and Pulling the Connection String from the web.config File lead to blank pages. If I may suggest, someone over there should create a web app from the very beginning, in C# and VBNet, using both SQL server and VFP data, and write down every last pertinent detail on every single step. That's really the only way we poor users can get up-and-running quickly and without too much frustration. Regards, Pertti
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
No, it's not really a ".NET" thing... it's just the way StrataFrame is configured. There is information within the help file on configuring your data sources within the Global.asax topic... Application -> WebForms -> Global.asax File Application -> WinForms -> AppMain.vb (program.cs) File -> SetDataSources() I'm not sure why you couldn't locate anything when you searched for "DataSourceKey"...
|
|
|
Pertti Karjalainen
|
|
Group: Forum Members
Posts: 54,
Visits: 4K
|
Ben, Thank you for your help here. I'm actually making some progress... I now have my "site" up again (well, if you can call it that when I have one read-only field with actual data coming in from a VFP table proudly displaying on my). A huge step for a man, a minute step for a mankind... Of course, I could'a had my VFP form like this up in about 15 seconds. And we call this progress? Granted, the VFP form by itself would not display in a browser (unless you use Terminal Services, of course, which gives you web AND rich AND snappy user interface experience all at once -- now THAT's progress). Is the below explained in the manual? I couldn't find any references for DataSourcekey even when I searched for the string itself in the help. Heck, I couldn't even find the string "DataSourceKey" anywhere in my project. This seems kind of a crucial step for those trying to get a web site with VFP data up and running, wouldn't you say? Or is this .NET knowledge we oughta to know regardless? Ben Chase (12/12/2006)
The first parameter of the VfpDataSourceItem constructor is not the OLE DB provider, it is the unique DataSourceKey that is used to identify the data source (a data source is synonymous with "connection string"). The second parameter is the actual connection string. So, your code line to add the actual data source should look like this: DataLayer.DataSources.Add(VfpDataSourceItem("", "Provider=VFPOLEDB;Data Source=C:\\CPW\\DATA\\CPW.DBC;")); The first parameter should match the value that you place in the DataSourceKey property of your business objects. This property on the business objects tells them what connection string to use when communicating with the database. That property defaults to string.Empty (""), so that is why when you only have one data source, you leave the first parameter of the constructor as an empty string.
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
Oh, and the connection string used within the BOMapper is only used to gather the structure information when the partial classes of the business objects are built. It it not used at runtime.
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
The first parameter of the VfpDataSourceItem constructor is not the OLE DB provider, it is the unique DataSourceKey that is used to identify the data source (a data source is synonymous with "connection string"). The second parameter is the actual connection string. So, your code line to add the actual data source should look like this: DataLayer.DataSources.Add(VfpDataSourceItem("", "Provider=VFPOLEDB;Data Source=C:\\CPW\\DATA\\CPW.DBC;")); The first parameter should match the value that you place in the DataSourceKey property of your business objects. This property on the business objects tells them what connection string to use when communicating with the database. That property defaults to string.Empty (""), so that is why when you only have one data source, you leave the first parameter of the constructor as an empty string.
|
|
|
Pertti Karjalainen
|
|
Group: Forum Members
Posts: 54,
Visits: 4K
|
Oh, and btw, it doesn't seem to matter what I do with global.asax, because I suppose object mapper overwrites it or something. I've tried commenting out all datasources, uncommenting with and without parameters, etc. No use. Pertti
|
|
|