It seems that the |DataDirectory| macro is giving VS 2005 fits. It's a minor issue though and I've stumbled on it recently.
The issue actually doesn't come up until you try to "add a new data source" to your project (after you've made the modification in your app settings/Project Properties to use the macro). So if you started of with ".something.sdf" and then changed it to use the macro, things do run fine....until you try to add a new datasource (new database datasource)
The error is: "Illegal characters in path" which is the pipe symbol.....
While on this subject, here's a tip to those who maybe going through some debugging mysteries:
Even if your sdf file is in your app "root" folder, if you debug, the file your app is actually working on is in the "indebug" folder. So it pays to create another connection in your Server Explorer to this file while debugging.
I spent quite some time trying to figure out why my code didn't seem to be working and got even more frustrated since obviously no errors were reported. Turns out I was looking at the wrong db file....hope this helps...
I want to store message database in SQLEv. Each message contains fixed header and a body. Body is UTF-16 encoded text. Average size of the body is about 700 symbols. Standard deviation about 1000 symbols. Maximum size - 200K symbols. Total count of the messages is up to 2 millions.
The only type I can use for body is text or binary blob. But blob larger than 256 bytes store in separate pages. Because of most message bodies lager than 256 bytes, each message take avg. PageSize / 2 not used for storing data, but occupied space.
For 2M messages this space will be 4096 / 2 * 2M = 4G. But SQLEv has 4G limit for database size!
Is it any way to store such data in SQLEv more efficiently?
Hi We are devloping a database management utility for MSDE,sql server enterprise and sql EV There are system queries available for performing index rebuild and setting minimum and max memory on msde and sql server by using the following statements below "DBCC DBREINDEXALL(S)" "SP_configure 'min server memory',1024 Reconfigure" "SP_configure 'max server memory',6144 Reconfigure" But is there a way I can perform the same on SQL Ev. I tried using the above statements, but it doesn't work out, can anyone help me with statements specific to SQL Mobile or Ev.
I am trying to make an asp.net application that will run from the SQL Compact database.
To deploy the application we changed from a full path Data Source="C:inetpubappasdf.sdf" to Data Source="|DataDirectory|asdf.sdf"
This returns: Illegal Character in Path
So I switched to having VS make the path for me Data Source=".App_Dataasdf.sdf" and got The path is not valid. Check the directory for the database. [ Path = .App_DataPDQ_Test_CE.sdf
Is there ANYWAY to use a relative path for the SQL Compact Connection string?
the following query always finishes within 1 minute
SELECT * FROM t1 INNER JOIN t2 ON t1.key= t2.key where t1.StartTime >= '3/19/2008' AND t1.EndTime <= '3/20/2008' AND t2.StartTime >= t1.StartTime AND t2.StartTime < t1.EndTime
however, the following always takes 10+ minutes declare @pStartDate datetime declare @pEndDate datetime set @pStartDate='3/19/2008' set @pEndDate='3/20/2008' SELECT * FROM t1 INNER JOIN t2 ON t1.key= t2.key where t1.StartTime >= @pStartDate AND t1.EndTime <= @pEndDate AND t2.StartTime >= t1.StartTime AND t2.StartTime < t1.EndTime
Both return same result. The only diff. is the blue part. Why the second one performances so badly? Thanks.
I am having some problems figuring out how the SSCE database connection string is set correctly in a forms application.
I have a database file, Database1.sdf, in the main directory of the application. I can add records to that via VS server explorer no probs. When I use any of the following connection strings in app.config..
Data Source ="|DataDirectory|Database1.sdf"
Data Source =".Database1.sdf"
Data Source ="Database1.sdf"
It will databind to a gridview of a combobox fine. However, when I create a form with some textboxes, build an insert string and use any of those connection strings with "Properties.Settings.Default.Database1ConnectionString" it just does nothing. No errors, no records inserted, just nothing.
But, if I change the connection stirng to...
Data Source ="D:\path\to\my\application\directory\Database1.sdf" (Just so happens I have this application on a D drive)
It all works just fine, including the insert.
So how do I refer to the database with virtual vs. absolute path? As far as I can tell the very first connection string I used should work, and should publish with the application.
I have a project. Originally when I created this project, I called it "Project_A", (and I did not create a solution directory).
Doing this created a folder called "Project_A" with the following files within it. I guess these are meta data files and I shouldnt be messing around with them. Anyway, I see
(1) Package.dtsx (The default package that gets created with a new project) (2) Project_A.database (3) Project_A.dtproj (4) Project_A.dtproj.user (5) Project_A.sln (6) Project_A.suo
When I rename my project in the Solution Explorer to "Project_B", the following happens in my folder.
Everything remains the same except Project_A.dtproj gets renamed to Project_B.dtproj and a new file called Project_B.dtproj.user gets created.
Now, my questions.
Question 1: What if I wanted my folder to have the same name as my project? Can I just change the folder name in Windows Explorer without having any ill-behaviors later on? I always have 1 project to 1 solution so I want to use the convention of keeping my folder named the same as my project.
Question 2: What about the files that are still named with Project_A dot blah blah. Is it bad if I renamed these to Project_B dot blah blah?
Can anyone explain why when I copy a data element and attempt to paste it it always appears waaay off screen in my SSIS 2005 package? Why won't it paste where I am right-clicking and telling it to go? I hate having to hunt for the element in the flow.
Hello. I am not very strong with SQL server. But I know enough to get my way around. The reason I am asking forhelp is that I need to change a SQL server script that resides on one of the production database servers of thecompany I work for. I just need to add two new lines to the stored procedure.(See the lines that are bolded.) Thesevalues are [MO_FAX],[MO_EMAIL]. Can someone tell me if there is a best way of going about doing this? Can I just simply open up SQL server and quickly make the change? The big issue here is that this script is used in production. So I am just a little worriedabout screwing something up. Anyway, I would appreciate some good advice on this?
/* Returns all data given the region and country */ALTER PROCEDURE [dbo].[GetAllInfomration] AS SELECT [COUNTRY], [Company_NAME], [CompanyAddress], [CompanyPhone], [MO_FAX] [MO_EMAIL] [CompanyFax], FROM [InfoLookup].[dbo].[Company_Contact] RETURN