Connection Wizard or Hardcoding datasource


Author
Message
Mike Thomas
Mike Thomas
StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)
Group: Forum Members
Posts: 26, Visits: 82
i am using sql server ce 3.5  my oledb provider is Microsoft.SQLSERVER.CE.OLEDB.3.5.  how do i modify appmain.vb to use this?  i don't think the connection wizard handles this but i could be wrong.  can someone step this beginner through whats necessary to hook my app up to the compact edition? 

Thanks in advance!

Mike

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You will not want to use the Connection Wizard in this case.  You will need to manually supply the connection string.  The Connection Wizard only works with:

  • SQL Server (no embedded editions)
  • Oracle
  • VFP
  • Access

If you need to connection to a different type of OLE database, then that is fine and SF will work, but you will have to manually supply the connection string:

MicroFour.StrataFrame.Data.DataBasics.DataSources.Add(New OleDbDataSourceItem("","My ConnectionString"))

When you do this you will place this code in the Appmain.vb SetDataSourcesMethod and then remoce the SetConnections line (as this forces the Connection Manager to be used).  Also, there is a lot of information about connection strings and setting them up manually within the help docs as well.

Mike Thomas
Mike Thomas
StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)
Group: Forum Members
Posts: 26, Visits: 82
Could you give me an example of what exactly i need to do Trent?  Sorry for the confusion.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.5K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Try this link. It provides examples of valid connection strings for SQL Server embedded edition.



http://www.connectionstrings.com/?carrier=sqlserver2005ce



You'd just plug the appropriate connection string into the line of code Trent provided:



MicroFour.StrataFrame.Data.DataBasics.DataSources.Add(New OleDbDataSourceItem("","My ConnectionString"))




Replace "My ConnectionString" with the connection string you actually want to use.



This setups a default data source with a key of "" (empty string, the default used for BOs). This goes in the SetDataSources method in AppMain.vb or program.cs (VB or C# respectively).
Mike Thomas
Mike Thomas
StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)
Group: Forum Members
Posts: 26, Visits: 82
here is what i am doing in appmain.vb...in the SetDataSources method i have the following code:

MicroFour.StrataFrame.Data.DataBasics.DataSources.Add(New OleDbDataSourceItem("PREMFRAME", "Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=C:\Users\michthom\Documents\Visual Studio 2008\Projects\premframev2\premframev2\premdatav2.sdf;"))

it tells me that OleDbDataSourceItem is not defined

i know i am missing something here.


Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.5K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I just searched through the object browser and I don't find this object....only datasourceitems for access, sql, oracle and vfp. That is strange. Is this in some other dll that isn't usually referenced? I also don't find anything about it in help.
Mike Thomas
Mike Thomas
StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)
Group: Forum Members
Posts: 26, Visits: 82
Thanks.  I hope Trent can clarify for us. 
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I am also looking for OleDbDataSourceItem for use with SQL Compact 3.5 as discussed in this and other threads on the forum. I have a simple application that does not warrant SQL Express, I have used SQL Compact for mobile applications and would now like to use with SF for desktop.

Please point me in the right direction as I cannot find anything on this provider in SF help.

Keith Chisarik

Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
An overview of how to deploy to SF Compact database (.sdf) from the DDT would be great too.

Keith Chisarik
Mike Thomas
Mike Thomas
StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)
Group: Forum Members
Posts: 26, Visits: 82
I hope someone can help soonSmile Smile
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