﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Database on a Web Server and One Locally - BO Reads Wrong Table</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 03:10:21 GMT</lastBuildDate><ttl>20</ttl><item><title>Database on a Web Server and One Locally - BO Reads Wrong Table</title><link>http://forum.strataframe.net/FindPost26522.aspx</link><description>I created a project that has a single form. I added a 2 projects that are BO Libs and one of the projects I added BO's attached to the web server database and the other project I added BO's attached to the local database. The databases have different names but the tables have identical names. I know that one of the tables on the web database is completely empty and has 100+ records locally. I use the BO assigned to the local database and simply try a me.filldatatable("Select * from bbresults") in the BO. I get no records which looks like to me it has read the table on the web server.&lt;br&gt;
Is there a way to change the select to say "Select * from localdatatabase.bbresults" to force it to use the correct connection? I tried it but it said 'Invalid object name ' so maybe it is just a syntax problem. I know I have read on the forum that you can use multiple databases but I could not find how to make sure you get or save to the correct tables when they are named the exact same. &lt;br&gt;
TIA.</description><pubDate>Thu, 18 Mar 2010 11:20:57 GMT</pubDate><dc:creator>Terry Bottorff</dc:creator></item><item><title>RE: Database on a Web Server and One Locally - BO Reads Wrong Table</title><link>http://forum.strataframe.net/FindPost26531.aspx</link><description>Glad you got it going, Terry! ;)</description><pubDate>Thu, 18 Mar 2010 11:20:57 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Database on a Web Server and One Locally - BO Reads Wrong Table</title><link>http://forum.strataframe.net/FindPost26529.aspx</link><description>Thank you both. With both of your help  I was able to get it working the way it should. I had read this line in the documentation 20 times but I always stopped where it says 'left alone' because I thought that is what it meant. I did not read the last part about why you would not want to leave it alone.&lt;br&gt;
&lt;br&gt;
from the AddRequiredDatasourceItem documentation:&lt;br&gt;
The first parameter needs to be left alone ("") because the DataSourceKey property on our business object (CustomersBO) is "". &lt;br&gt;
&lt;br&gt;
Thanks again.......</description><pubDate>Thu, 18 Mar 2010 10:53:12 GMT</pubDate><dc:creator>Terry Bottorff</dc:creator></item><item><title>RE: Database on a Web Server and One Locally - BO Reads Wrong Table</title><link>http://forum.strataframe.net/FindPost26524.aspx</link><description>Hi Terry,&lt;br&gt;
&lt;br&gt;
Following Ivan's reply, look at the "Connecting to Data" in the help file for more detail explanation.&lt;br&gt;
&lt;br&gt;
Basically you have to add a datasource item for your web server connection and add a DataSourceKey, then in you BO you manually enter the DataSourceKey used, so the BO will know which connection to use.&lt;br&gt;
&lt;br&gt;
By default SF datasources does not have any key which is why we don't need modify the connection, but having this flexibility allows any SF application to simultaneously connect to different databases hosted on different servers or locations.</description><pubDate>Wed, 17 Mar 2010 14:37:56 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Database on a Web Server and One Locally - BO Reads Wrong Table</title><link>http://forum.strataframe.net/FindPost26523.aspx</link><description>Hi Terry.&lt;/P&gt;&lt;P&gt;Have you configured different DataSourceKeys for the Databases? And if so, did you set the DataSourceKey property for the BOs?</description><pubDate>Wed, 17 Mar 2010 14:34:03 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item></channel></rss>