StrataFrame Forum

Can't Connect To SQL Server 7.0

http://forum.strataframe.net/Topic936.aspx

By StarkMike - 4/25/2006

I was going through the tutorial and when I was in the Business Object Mapper I was unable to connect to SQL Server 7.0. The server is running Windows 2000 SP4. I've tried connecting using Windows Integrated Security and by using the 'sa' account. Neither works. The sa password is not blank.



It sees the server but when it tries to load the databases, it doesnt populate the databases combo box.



Any suggestions?

Thanks

Mike
By Trent L. Taylor - 4/25/2006

Mike,

We have had some people use SQL Server 7.0, however, StrataFrame is optimized for SQL Server 200 and 2005.  I will have to setup a SQL Server 7.0 instance someplace before I can test this. 

When you loaded the StrataFrame databases, did you load them on the SQL Server 7.0 server or a later version?

By StarkMike - 4/26/2006

I loaded the StrataFrame databases onto a SQL Server 2000 instance. I used the defaults for the installation and I did specify an sa password.
By Trent L. Taylor - 4/26/2006

So you are just trying to pull a structure from an SQL 7.0 database then and the StrataFrame databases are on a SQL Server 2000 instance.  Is this correct?

The tutorial uses the StrataFrameSample database and creates a business object called CustomersBO and then maps that business object to the Customers table in the StrataFrameSample database.  Are you able to pull the structure from SQL the Server 2000 instance?

As I mentioned earlier, the 7.0 instance may not pull the structure correctly.  We do guarantee StrataFrame support for SQL Server 2000 or later, but not 7.0. 

Another option is to load SQL Server 2005 Express or MSDE.  Both of these databases are free and Express comes as part of the Visual Studio 2005 install or you can easily download it off of the website.

I really want to get you going, but I recommend working through the trial on SQL Server 2000 or later. 

By StarkMike - 4/26/2006

Here's how I have it setup. I installed a developer version of SQL Server 2000 from my MSDN library, and this is where I have installed the StrataFrame internal and sample databases. I was aware of a problem connecting to SQL Server 7.0 and I wanted to be able to learn the framework without having to deal with this problem at the same time.



I was working my way through Tutorial 1 and I was in the Business Object Mapper setting the project properties (setting the SQL Server connection string) I was going to connect to my SQL Server 2000 database to base the Business Object on but thought I would try to connect to the SQL Server 7.0 server, just to see if i could. I specified the name of the server and the sa credentials... when I tried to open the databases drop down, it said it was loading them and when I opened the drop down it was empty. I remember one of you guys was telling me that I can't use a blank sa password.. so I've created a new instance of SQL Server 7.0 that the sa has a password.



Thanks
By StrataFrame Team - 4/26/2006

What you might try is this, Mike:



Don't use the wizard to create the connection string, but type it in manually. NOTE: Within the BOMapper, you don't have to specify the database within your connection string, so these connection strings would work fine:



Server=MyServer;Integrated Security=SSPI;



Server=MyServer;User Id=sa;Password=MyPassword;



You don't need the database, because the BOMapper only connects to the "master" database to gather the structure information on the server. So, if the dropdown list won't populate with the databases, try skipping the wizard and just entering your connection string manually. Then, when you configure a business object and point it to a specific table, the BOMapper should be able to use the connection string you entered to read the database structure without problem.
By StarkMike - 4/26/2006

Ok, I simply pasted the connection string into the text box in Project Properties screen in the Business Object Mapper and that worked. YAY! BigGrin



However, I'm trying to run my app for the first time and the connection wizard comes up. I commented out the automated section in AppMain...SetDataSources and un-commented this secton. I specified my connection string and tried to the run the app but the connection wizard still comes up. What do I do from here to prevent that wizard from appearing?



'------------------------------------

' Setting the data sources manually

'------------------------------------

'-- SQL Server

DataLayer.DataSources.Add(New SqlDataSourceItem("", "workstation id=1LPMMURPHY;packet size=4096;user id=sa;data source=web;persist security info=True;initial catalog=InjuryCostTracking"))
By StrataFrame Team - 4/26/2006

The connection string wizard pops up whenever you call the ConnectionManager.SetConnections() method... make sure it's commented out as well Smile



Whenever you set the data sources, you can either set the required connections and then call SetConnections() which adds the data source items to the DataSources collection, or you can just add the data source items to the collection manually.



When you add the items manually, you don't need to call SetConnections().
By StarkMike - 4/26/2006

Ok, I'm still not getting it. I'm trying to add the data source item manually and its not working. I have attached a screen shot of my SetDataSources sub and a screen shot of the error I'm getting.
By StrataFrame Team - 4/26/2006

Whatever database is set as the initial catalog (in this case "InjuryCostTracking") should contain the table/view/stored procedure "Items", if it doesn't then there's your problem. It might also be that "Initial Catalog" is a 2000+ term, and you might replace it with "Database" making your connection string this:



workstation id=ILPMMURPHY;packet size=4096;user id=sa;data source=web;persist security info=True;Database=InjuryCostTracking;



For some reason, the SQL client cannot see the table "Items" when connecting with the connection string you've provided.
By StarkMike - 4/26/2006

Thanks Guys... this issue seems to be resolved.



Ben, the connection string problem I mentioned was my fault and a ROOKIE mistake.. I had specified the wrong database in my connection string! Tongue
By StrataFrame Team - 4/26/2006

No problem Mike...



We have plenty of room for rookies Smile (everyone knows I was one once, and I'm not far from it now Tongue )