Login Error


Author
Message
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
I have a Maintenace form setup, select add and populate my fields.

The fields populate ok

I then select Save data, but a Strataframe error message apperas, ....

Cannot Open database "MyDataBase" requested by the login.

I have not specisied a Login screen anywhere and cant remeber setting up a database called MyDatabase ...

Replies
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
This is just a standard SQL connection error.  The user who you are attempting to use cannot login or access the SQL Server connection for some reason.  If you'll notice, it is trying to connect to SQL Server and I do not see that you have specified a SQL connection. 

Are you reusing this application key: StratFarmeSmaApp?

If so, then this could be your problem.  Change this key by adding a "1" to the end or something and it should force the connection wizard to come back up.  Make sure that you are pointing to the VFP database and see if the error persists. 

ConnectionManager.ApplicationKey = "StratFarmeSmaApp1";

If this doesn't work, remove the ConnectionManager.SetConnections() in the SetDataSOurces and hard code your connection and see if the error persists.

MicroFour.StrataFrame.Data.DataBasics.DataSOurces.Add(New VFPDataSourceItem("","provider=VFPOLEDB;data source=C:\\MyDatabase.dbc"));

In fact, the first thing you may want to do is turn on database debugging so you can see exactly what is happening.  After the ConnectionManager.SetConnections() method, add this code:

MicroFour.StrataFrame.Data.DataBasics.DataSources[0].SetDebugOn(@"c:\Output.html",true);

Run the application again and it will log every piece of the data interaction.  One the error occurs, bring up the HTML file and you will be able to see the connection and exactly what happened.

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Most likely, you ran the application once before you commented out the AddRequiredDataSourceItem for SQL that requested MyDatabase.  So, your application still thinks it needs MyDatabase.  Right after the SetConnections() method is called within the SetDataSources() method, you can add a call to ConnectionManager.ShowAvailableConnections().  This will popup the connection string builder and allow you to delete the configured connection.  Then re-run it without call to ShowAvailableConnections() and you can re-configure the connection string properly with for the FoxPro connection.
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