﻿<?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 » WinForms (How do I?)  » Connection Wizard or Hardcoding datasource</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sat, 06 Jun 2026 03:19:14 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost31741.aspx</link><description>What is the specific error you receive, Marcelo? &amp;nbsp;The connection string looks fine, and I'm pretty sure that the System.Data.SqlClient provider will support SQL Server CE.</description><pubDate>Mon, 21 Jan 2013 10:50:58 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19243.aspx</link><description>i am using sql server ce 3.5&amp;nbsp; my oledb provider is Microsoft.SQLSERVER.CE.OLEDB.3.5.&amp;nbsp; how do i modify appmain.vb to use this?&amp;nbsp; i don't think the connection wizard handles this but i could be wrong.&amp;nbsp; can someone step this beginner through whats necessary to hook my app up to the compact edition?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Mike</description><pubDate>Mon, 21 Jan 2013 10:50:58 GMT</pubDate><dc:creator>Mike Thomas</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost31740.aspx</link><description>Hi.&lt;br/&gt;&lt;br/&gt;&lt;div&gt;I´m having the same problem ... I need to use a Compact SLQ to a small test app.&lt;br/&gt;&lt;br/&gt;&lt;div&gt;I can´t get the connection on the app...&lt;br/&gt;&lt;br/&gt;&lt;div&gt;I´m doing this, but gives me an error when try to get the data&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div&gt;&lt;div&gt;&amp;nbsp;private static void SetDataSources()&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataLayer.DataSources.Add(new SqlDataSourceItem("ATG",""));&lt;br/&gt;&lt;br/&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MicroFour.StrataFrame.Data.DataLayer.DataSources["ATG"].ConnectionString =@"Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Data Source=D:\PROJETOS\SGO\ATGConnector\ATGConn\ATGConn\Ordens.sdf;SSCE:Database Password='123456';";&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div&gt;How to set up the SQL Compact with Strataframe ?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 21 Jan 2013 07:45:38 GMT</pubDate><dc:creator>Marcelo Blank</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19401.aspx</link><description>Thanks for the contribution, Keith.&amp;nbsp; You may want to add this to the user contributed samples area...I think that this would be a good fit ;)</description><pubDate>Sun, 14 Sep 2008 10:26:25 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19398.aspx</link><description>Trent is right naturally, anything but a very simple app or disconnected feature would be better with Express.&lt;/P&gt;&lt;P&gt;That being said, my&amp;nbsp;current project&amp;nbsp;is VERY simple as far as data goes as it mostly does scanning and image manipulation, and&amp;nbsp;will be single workstation only,&amp;nbsp;so SQL Compact I think will be the right choice based on past experience with it.&lt;/P&gt;&lt;P&gt;The attachment is a very simple working sample that uses SF 1.6.6, the ADO .NET Provider for SQL Compact 3.5 (had issues with OLEDB updates I couldnt get past) included with VS2008, and the System.Data.SQLServerCE namespace used to create a SQLCEDataSourceItem.&amp;nbsp;I tested with OptomisticRowVersion since that is what I use. Just slap the SDF file in the ZIP onto the root of your C drive and it should work. Good luck and I hope it helps someone.</description><pubDate>Sun, 14 Sep 2008 01:23:23 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19395.aspx</link><description>[quote]Hi Trent, if you had to develop a desktop solution for say home users - what database would you use foxpro or access?&amp;nbsp; it looks like i may not understand enough to get the framework to work with sql compact edition.&amp;nbsp; I am a past foxpro person but i wonder about using that anymore as a backend. [/quote]&lt;/P&gt;&lt;P&gt;If I had to choose between those two it would be Access.&amp;nbsp; FoxPro is nothing but a problem waiting for a place to happen...this comes from &lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;MANY&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt; years of experience.&amp;nbsp; &lt;/P&gt;&lt;P&gt;But in truth, I would not use either of these, but SQL Server Express.&amp;nbsp; I know that this post has been geared around embedded database conversation, but there is a reason that we have not yet created a data source item for this...there is generally a better solution.&amp;nbsp; I do see the benefits of a disconnected laptop for the day, etc.&amp;nbsp; But even then I would tend to lean towards SQL Server Express.&amp;nbsp; First of all, it is free.&amp;nbsp; Secondly, it is faster and a full version of SQL Server.&amp;nbsp; Additionally, you don't have to deal with data type issues.&amp;nbsp; For example, SQL Mobile doesn't have a VarChar data type but only a NVarChar (unless something has changed recently).&amp;nbsp; Not that using an NVarChar is bad, but it just might not line up exactly with the desktop structures (if you a.] have the need or b.] ever plan to have a larger version of an application).&lt;/P&gt;&lt;P&gt;In my opinion, and if I were hired in a capacity for consultation purposes in a situation like this, I would tell my client that they are better off developing on a full SQL Server version versus an embedded edition....I have a lot of embedded experience from years past and there are other issues that you will inevitabely run into (i.e. row locking, etc.).</description><pubDate>Sat, 13 Sep 2008 22:34:46 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19393.aspx</link><description>Distributing SQL Express is extremely easy.&amp;nbsp; In fact, if you use a tool like InstallAware, it is literally as easy as clicking a CheckBox and tweaking a few parameters.&amp;nbsp; We use InstallAware for our medical software and though, like any install software, there are some frustrations, one thing that they got right were the pre-reqs and installing pre-reqs.&lt;/P&gt;&lt;P&gt;Even if you choose to do this yourself, you can download the SQL Server Express redistributable and via command lines install it very easily.&amp;nbsp; SQL Server is also easy to test for in regards to services if you take the manual approach.&amp;nbsp; We use SQL Server Express in a high percentage of our medical software user base and so we have to test for and install SQL Server Express if needed.&amp;nbsp; This is really one of the easier parts of the install.</description><pubDate>Sat, 13 Sep 2008 22:27:48 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19375.aspx</link><description>Two apps i have in mind...one is for the home market&amp;nbsp; and I was thinking i didn't want the overhead and possibly slower performance of the SQL Express if I could use compact edition.&amp;nbsp; Also, i am not sure whats involved in distributing sqlexpress to get it install properly as part of the application installation.&lt;/P&gt;&lt;P&gt;do you have some experience with sqlexpress and distributing?</description><pubDate>Fri, 12 Sep 2008 17:17:41 GMT</pubDate><dc:creator>Mike Thomas</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19374.aspx</link><description>Hey Mike.&lt;/P&gt;&lt;P&gt;Just curious... what are your reasons for not using SQL Server Express?</description><pubDate>Fri, 12 Sep 2008 17:12:55 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19371.aspx</link><description>Hi Trent, if you had to develop a desktop solution for say home users - what database would you use foxpro or access?&amp;nbsp; it looks like i may not understand enough to get the framework to work with sql compact edition.&amp;nbsp; I am a past foxpro person but i wonder about using that anymore as a backend.</description><pubDate>Fri, 12 Sep 2008 15:50:37 GMT</pubDate><dc:creator>Mike Thomas</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19370.aspx</link><description>I am up and running yes.</description><pubDate>Fri, 12 Sep 2008 15:03:06 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19367.aspx</link><description>Kieth, not sure what you are saying....you app is now working against sql compact edition because you created your customer datasource item?</description><pubDate>Fri, 12 Sep 2008 14:49:01 GMT</pubDate><dc:creator>Mike Thomas</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19366.aspx</link><description>Well, this would really only be something that you could answer.&amp;nbsp; It will be a while before we create an SqlCeDataSourceItem ourselves...so if you have this immediate need and do not want to use the OLEDB, then you may want to proceed.</description><pubDate>Fri, 12 Sep 2008 14:00:00 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19356.aspx</link><description>Trent any opinion on wheher it would be worthwhile to finish the SQLCEDatasoureItem I started versus using OLEDB?</description><pubDate>Fri, 12 Sep 2008 11:32:59 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19353.aspx</link><description>Oh my. That worked on my work PC, I was trying this stuff at home last night, apparently there is a problem with my install on that box that was the cause of my issues, better late than never.&lt;/P&gt;&lt;P&gt;Thank you for posting this. On a PC that has a good install ( :cool: ) I got OLEDB working.&lt;/P&gt;&lt;P&gt;1) Created OLEDBSOURCE class&lt;/P&gt;&lt;P&gt;2) use #1 in appmain: &lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;MicroFour.StrataFrame.Data.DataBasics.DataSources.Add(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; OLEDBSOURCE(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;""&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=C:\ioivb.sdf"&lt;/FONT&gt;&lt;FONT size=2&gt;))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;3) Change my fills to use OLEDBCommand instead of SqlCommand&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Fri, 12 Sep 2008 11:29:23 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19350.aspx</link><description>BO Mapper worked fine for me against sql compact edition.&amp;nbsp; Just had to select oledb and then have the proper connection string which for me was the following&lt;/P&gt;&lt;P&gt;Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=C:\Users\michthom\Documents\Visual Studio 2008\Projects\premframev2\premframev2\premdatav2.sdf&lt;/P&gt;&lt;P&gt;i think i don't understand the framework enough to do what trent is suggesting.&amp;nbsp; I would love if someone had a sql compact code example i could customize for my file.&amp;nbsp; I do really need to use the desktop edition so i am not sure what to do</description><pubDate>Fri, 12 Sep 2008 10:47:36 GMT</pubDate><dc:creator>Mike Thomas</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19346.aspx</link><description>I could not get OLEDB to work, if anyone does I would appreciate an email to &lt;A href="mailto:kchisarik@sigmadatainc.com"&gt;kchisarik@sigmadatainc.com&lt;/A&gt; to let me know what you did but for now I have moved on based on I would rather is an ADO driver than OLEDB anyhow and I spent too much time on&amp;nbsp;OLEDB already.&lt;/P&gt;&lt;P&gt;The provided SQLDataSourceItem will not work due to differences in features support between SQL Serevr and SQL compact. Basic stuff like schema designation, use of IDENTITY_SCOPE are not supported and must be removed from the SQL commands. I went down the road of creating a SQLCEDataSourceIitem that uses the System.Data.SqlServerCE namespace and have had good results so far. I have basic databinding and UPDATES working using the following in appmain.&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;MicroFour.StrataFrame.Data.DataBasics.DataSources.Add(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; SqlCEDataSourceItem(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;""&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Data Source=C:\ioivb.sdf;"&lt;/FONT&gt;&lt;FONT size=2&gt;))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Again, if someone out there gets either the BOMapper or SF in general to work with less&amp;nbsp;effort using OLEDB, I would appreciate a heads up. If anyone is interested in the SQLCEDataSourceItem, let me know. It will only have the "_NONSP" items done, but it will work.&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Fri, 12 Sep 2008 08:04:27 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19345.aspx</link><description>Well, Ivan was telling you how to get back to ground zero.&amp;nbsp; The AfterBuild.bat file is actually distributed with the source code, but the PostBuild event is just looking for it on the c:\ folder.&amp;nbsp; So you can copy the AfterBuild.bat to the c:\ and then it will work from that point forward.&lt;/P&gt;&lt;P&gt;Secondly, you should not be changing the SF source code, which it sounds like you are doing.&amp;nbsp; You should create your DbDataSourceItem in one of your assemblied, not the SF base assembly.&amp;nbsp; You &lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;NEVER&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt; want to change the SF source if you plan to ever receive another update.&amp;nbsp; This is why you want to create your own base assembly which references the SF Base and then either inherit and override logic or create your SF inherited classes there so that when you get a new version of SF it doesn't wipe out your code and require you to go back and keep putting things in.</description><pubDate>Fri, 12 Sep 2008 08:02:37 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19340.aspx</link><description>Thank you will try.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Do you know if by getting that error that anything was rebuilt?&amp;nbsp; do i need to take out the post build event out to get it to rebuild successfully first?&lt;/P&gt;&lt;P&gt;Thanks again everyone!</description><pubDate>Fri, 12 Sep 2008 06:30:07 GMT</pubDate><dc:creator>Mike Thomas</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19332.aspx</link><description>Oh...and Ivan's suggestions look good, Mike&amp;nbsp;:D</description><pubDate>Thu, 11 Sep 2008 21:48:01 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19331.aspx</link><description>[quote]PS - Cowboys 21 - Eagles 30 Monday night [/quote]&lt;/P&gt;&lt;P&gt;Well...you know, the other day Charles Hankey sent me something prior to the Browns game...and well, we know how that turned out.&amp;nbsp; So I will wait until next Tuesday before I say too much...but when the Boys win :w00t: ... then I will have more to say :D</description><pubDate>Thu, 11 Sep 2008 21:47:29 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19321.aspx</link><description>Hey Mike.&lt;/P&gt;&lt;P&gt;Try the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Close down all Visual Studio Instances &lt;LI&gt;Open two Explorer Windows.&amp;nbsp; Navigate one to the "C:\Program Files\MicroFour\StrataFrame Source Code\MicroFour StrataFrame Base\bin" folder and the other to the "C:\Windows\Assembly" folder. &lt;LI&gt;select the "MicroFour StrataFrame Base.dll" from the bin folder &lt;LI&gt;Drag the selected file into the "c:\windows\assembly" folder (GAC) &lt;LI&gt;Also copy the "MicroFour StrataFrame Base.dll" and the "microfour strataframe base.xml" to the "c:\program files\common files\microfour\strataframe" folder &lt;LI&gt;Your assemblies will now be on the latest build. &lt;LI&gt;Go back into Visual Studio &lt;/LI&gt;&lt;/OL&gt;</description><pubDate>Thu, 11 Sep 2008 16:41:24 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19315.aspx</link><description>copied file and renamed ...not sure what all changes need to be made as it looks very generic to any ole provider.&lt;/P&gt;&lt;P&gt;tried to rebuild microfour.strataframe base and got the following error...&lt;/P&gt;&lt;P&gt;Error&amp;nbsp;1&amp;nbsp;The command ""C:\Program Files\MicroFour\StrataFrame Source Code\MicroFour StrataFrame Base\AfterBuild.bat" "C:\Program Files\MicroFour\StrataFrame Source Code\MicroFour StrataFrame Base\bin\MicroFour StrataFrame Base.dll" "C:\Program Files\MicroFour\StrataFrame Source Code\MicroFour StrataFrame Base\bin\microfour strataframe base.xml"" exited with code 9009.&amp;nbsp;microfour strataframe base&lt;BR&gt;&lt;/P&gt;&lt;P&gt;was i doing the right thing?</description><pubDate>Thu, 11 Sep 2008 14:59:52 GMT</pubDate><dc:creator>Mike Thomas</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19306.aspx</link><description>Excellent, your your vacation was relaxing. Welcome back.&lt;/P&gt;&lt;P&gt;PS - Cowboys 21 - Eagles 30 Monday night</description><pubDate>Thu, 11 Sep 2008 12:26:43 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: Connection Wizard or Hardcoding datasource</title><link>http://forum.strataframe.net/FindPost19305.aspx</link><description>[quote]Is adding official support for SQL Compact on the radar?[/quote]&lt;/P&gt;&lt;P&gt;Yes...but it is a very faint blimp :)&amp;nbsp; There are a number of other more highly demanded things ahead of this...so though this is something that will definitely be part of the framework, it may be a while.&amp;nbsp; Probably the next major release (SF 2.0).</description><pubDate>Thu, 11 Sep 2008 12:10:44 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>