Connection Wizard or Hardcoding datasource


Author
Message
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
Well, Ivan was telling you how to get back to ground zero.  The AfterBuild.bat file is actually distributed with the source code, but the PostBuild event is just looking for it on the c:\ folder.  So you can copy the AfterBuild.bat to the c:\ and then it will work from that point forward.

Secondly, you should not be changing the SF source code, which it sounds like you are doing.  You should create your DbDataSourceItem in one of your assemblied, not the SF base assembly.  You NEVER want to change the SF source if you plan to ever receive another update.  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.

Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I could not get OLEDB to work, if anyone does I would appreciate an email to kchisarik@sigmadatainc.com 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 OLEDB already.

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.

MicroFour.StrataFrame.Data.DataBasics.DataSources.Add(New SqlCEDataSourceItem("", "Data Source=C:\ioivb.sdf;"))

Again, if someone out there gets either the BOMapper or SF in general to work with less 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.



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
BO Mapper worked fine for me against sql compact edition.  Just had to select oledb and then have the proper connection string which for me was the following

Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=C:\Users\michthom\Documents\Visual Studio 2008\Projects\premframev2\premframev2\premdatav2.sdf

i think i don't understand the framework enough to do what trent is suggesting.  I would love if someone had a sql compact code example i could customize for my file.  I do really need to use the desktop edition so i am not sure what to do

Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
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.

Thank you for posting this. On a PC that has a good install ( Cool ) I got OLEDB working.

1) Created OLEDBSOURCE class

2) use #1 in appmain:

MicroFour.StrataFrame.Data.DataBasics.DataSources.Add(New OLEDBSOURCE("", "Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=C:\ioivb.sdf"))

3) Change my fills to use OLEDBCommand instead of SqlCommand

 

 



Keith Chisarik
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Trent any opinion on wheher it would be worthwhile to finish the SQLCEDatasoureItem I started versus using OLEDB?

Keith Chisarik
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
Well, this would really only be something that you could answer.  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.
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
Kieth, not sure what you are saying....you app is now working against sql compact edition because you created your customer datasource item?
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I am up and running yes.

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
Hi Trent, if you had to develop a desktop solution for say home users - what database would you use foxpro or access?  it looks like i may not understand enough to get the framework to work with sql compact edition.  I am a past foxpro person but i wonder about using that anymore as a backend.
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hey Mike.

Just curious... what are your reasons for not using SQL Server Express?

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