|
Hi,
SQLCE is a "full" functional database although it is meant for single user desktop applications (as local datastore). This basically means that your application contains following elements:
- application and referenced assemblies
- referenced assemblies to use SQLCE
- actual database files
Changes to the database are always persisted to database files solely by database engine (SQLCE). So the fact that you "manage" the database file(s) through a Visual Studio project, doesn't mean that these files are actually embedded into the exe, but they are only registered as part of the project and can be for example deployed using ClickOnce.
Data can be added, modified and deleted to the database while creating the application and after the deployment by the application.
Then about the security. There are several techniques concerning database protection. Passwords are perhaps the simpliest. If the user can access the data files of the database (via file system) he can use them through different tools so connection password is one way to prohibit usage.
Hope that this answers at least some of the questions,
Mika
|
|
|
|
|
The problem:
I am using Windows Vista Business SP1, Visual Studio 2008 Professional Edition SP1, .NET Framework 3.5 SP1, SQL Server 2008 Express SP1. I attached the Northwind 2000 and Pubs 2000 databases.
The Add New Data Source wizard connects to the database fine and also saves the connection string in the config file, but then it refuses to show the database objects for me to choose from.
It's really a mystery to me why this is happening, but it is stopping my development in its tracks.
Note: It may be helpful to mention I installed SQL Server 2008, and then installed VS2008, updated it to SP1, was having a problem with the SQL server services, so I then uninstalled and reinstalled SQL Server 2008.
Steps to Reproduce:
Note: Basically, I was following the Walkthrough: Creating a N-Tier Data Application[^] in the MSDN help.
1. Start with no solution open.
2. Click File, point to New, and then click Project.
3. In the New Project dialog box, in the Project Types pane, click Visual C# and in the Templates pane, click Class Library.
4. Type any random project and solution name. I was following the N-Tier Walkthrough in the Help at the time, so I named the class library project "DataEntityTier" and renamed the solution to "NTier Walkthrough."
5. Click OK. Visual Studio 2008 generates the new solution and creates the project.
6. From the File menu, add a new project to the NTierWalkthrough solution.
7. In the New Project dialog box, in the Templates pane, click Class Library.
8. Name the project DataAccessTier and click OK (again I am following the walkthrough in Help -- the name doesn't matter though).
9. The DataAccessTier project is created and added to the NTierWalkthrough solution.
10. Click DataAccessTier in Solution Explorer.
11. On the Data menu, click Show Data Sources.
12. In the Data Sources window, click Add New Data Source to start the Data Source Configuration Wizard.
13. On the Choose a Data Source Type page, click Database and then click Next.
14. On the Choose Your Data Connection page, perform one of the following actions:
15. Click the existing data connection brianhart-pc\sqlexpress.Northwind.dbo in the drop-down list, and then click Next.
- The connection string is: Data Source=BRIANHART-PC\SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=True
16. Click Next on the Save the Connection String to the Application Configuration File page.
17. The wizard takes a while, all along saying "Retrieving information from the database" for a while, and then says:
An error occurred while retrieving the information from the database:
The type initializer for 'Microsoft.VisualStudio.DataDesign.SyncDesigner.SyncFacade.SyncTableConfigManager' threw an exception.
Has anyone encounted this?
Sincerely Yours,
Brian Hart
moved on Saturday, August 23, 2008 4:04 PM
|
|
|
|
|
OK, you're in the wrong forum - read the notes at the top of the forum. And then you'd probably want to go and post this on the MS support pages...
|
|
|
|
|
Thanks and apologies to all...my mistake
Sincerely Yours,
Brian Hart
|
|
|
|
|
Now this is something I don't see very often these days.
|
|
|
|
|
mistakes? by me? never! hahaha
Sincerely Yours,
Brian Hart
|
|
|
|
|
hi
I have scheduled a job on backup cluster to take backup from production server. To access my production server i have a link server. It was worked fine untill last week. Now it has failed due to 'login failed for 'NT AUTHORITY/ANONYMOUS'. Plz any one let me know the solution.
D.Willington
|
|
|
|
|
When you configured the linked server, did you setup security to use that login('NT AUTHORITY/ANONYMOUS') as a security context? If yes make sure that the password is correct and that this user has permission in the production server you are trying to access.
|
|
|
|
|
I am creating a project in .net and i have to retrieve some data from tables on the conditions:
1) A user can create multiple profiles,upto 20 in 20 different categories (The data is stored in "profiles" table)
2) There is a "project" table in which projects are stored in 20 different categories
3) project categories are same as profile categories
The problem is i want to retrieve all the projects where project categories are same as a users categories
For example:
if user A has profiles in categories x,y, and z I want to retrieve the details of projects in categories x,y, and z.
number of profiles for different users are differen someone has 2 profiles while other one has 5 profiles it can be varied
If anyone can help me in SQL Query I will be highly thankfull
|
|
|
|
|
not getting wht u exactly wants ?
sql statement for dis tables ? coz its very simple you hav to use inner joins dats it
Reasons are not Important but Results are Important
|
|
|
|
|
Let me first explain you the requirement
Table Profiles:
employeeid ------ category
-----------------------------------
a ----------- Finance
b ---------- HRD
c ---------- Sales
a ------------ HRD
a ------------ Sales
b ------------ Finance
Table Work
category --------- Title
------------------------------------------------
Finance ---------- maintaining annual accounts
HRD ------------ Recruitement of skilled employees
Sales ------------ Sales of newly launched product
Finance----------- Creating Report (Quarterly)
HRD--------------- Managing Employee's Feedback
Now if I want to find work available the result should be like:
for employee a-
Category --------- Title
---------------------------------------------
Finance ---------- maintaining annual accounts
Finance----------- Creating Report (Quarterly)
HRD--------------- Managing Employee's Feedback
HRD ------------ Recruitement of skilled employees
Sales ----------- Sales of newly launched product
for employee b-
Category -------- Title
--------------------------------------------------------
Finance----------- Creating Report (Quarterly)
Finance --------- maintaining annual accounts
HRD ------------ Recruitement of skilled employees
HRD--------------- Managing Employee's Feedback
The problem is that I don't know the exact appearance of an employee in the profile table, and thats why I think joins are out of scope(I am not an expert in SQL)
Hope this may clear some fog.Thanks.
modified on Tuesday, August 19, 2008 8:33 AM
|
|
|
|
|
When emplpyeeid is a then use query down
<br />
SELECT profiles.Employeeid,profiles.Category,[work].Title<br />
FROM profiles,[work]<br />
WHERE profiles.category = [work].category<br />
and profiles.employeeid='a'<br />
ORDER BY [work].category ASC
If you have to show all employeeid's then use this another query
<br />
SELECT profiles.Employeeid,profiles.Category,[work].Title<br />
FROM profiles,[work]<br />
WHERE profiles.category = [work].category<br />
and profiles.employeeid in(SELECT DISTINCT t1.Employeeid FROM profiles AS t1)<br />
ORDER BY profiles.Employeeid,[work].category ASC
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
what i got is there is 3 tables
1> category - Master table
2> profile - here employee with category(Transaction table)
3> project - here project in different category(Transaction table)
where category is common in profile and project.
select distinct profile.employeeid,project.projectname,project.categoryname
from project
inner join category on
category.catid = project.project_catid
inner join profile on
profile.prof_catid = project.catid
where profile.employeeid='a'
if above is correct Now tell me where r u not getting?
or May be i am not getting you
Reasons are not Important but Results are Important.
Swati
|
|
|
|
|
Both of you thanks for suggestions but its not working.
Let me make a final attempt to clear my issue
if I create a stored procedure as:
create procedure selectworks
(
@maincategory nvarchar(50)
)
as
select profile.category,
project.title,
project.subcategory,
project.expirydate from profile,project
where profile.category=@maincategory
and project.category=@maincategory
this is going to give me result for one category which i am going to provide( @maincategory)
but the issue is that the user has profiles in more than one category
if he has profiles in 3 categories this procedure should run for 3 times for 3 different categories but the result should come combined similarly if a user has profiles in 5 categories this procedure should run for 5 times for 5 different categories but should give combined result.
Thanks in advance..
|
|
|
|
|
1>First of all why you wants to pass category rather then employee id ???
2>if there is any necessity of passing category then you can use of
char index Or IN where you have to pass all the category separated by comma.
ex:- @maincategory='1,2,3'
1> CHARINDEX(',',@maincategory ) > 0
2> project.category IN (@maincategory)
Reasons are not Important but Results are Important.
Swati
|
|
|
|
|
Thanks a lot Swati I got the solution.Thanks...
|
|
|
|
|
hi all
can anyone tell me how to (query to)find the first three highest salaries from a table.
Example
input
Name Salary
a 1000
b 5000
c 8000
d 11000
e 15000
f 2000
output:
salary
15000
11000
8000
thanks in advance...
pintoo
|
|
|
|
|
select top 3 salary from
tablename
order by salary desc
Reasons are not Important but Results are Important
|
|
|
|
|
hi
thanks for answering..can u tell me how to write(modify) this query without using TOP keyword.
pintoo
|
|
|
|
|
I wonder why you don't want to use TOP, but here's another version:
SELECT Name, Salary
FROM TableName alias1,
WHERE 4 < (SELECT COUNT(*)
FROM TableName alias2
WHERE alias2.Salary > alias1.Salary)
Mika
|
|
|
|
|
I think that the Top will be the best choice, unless your using something other than SQL Server.
If your using MySQl, use Limit 3 at the end of the statement.
Select Salary
From tablename
Order By Salary Desc
Limit 3
I think any other method will cause overhang.
|
|
|
|
|
A view is a virtual table that consists of columns from one or more tables. Though it is similar to a table, it is stored in the database. It is a query stored as an object.
So what is the use of Views because i think one can do anything and everything with the tables without having Views...........
Plz explain ?????????
|
|
|
|
|
|
Views are faster and they hide the query complicity.
|
|
|
|
|
Hi,
Please go though the following articles for better explaination:
Article1[^]
Article2[^]
Hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|