|DataDirectory| - Minor Issue SQLev

Oct 16, 2006

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...

View 3 Replies


ADVERTISEMENT

What Is The DataDirectory In @Data Source = |DataDirectory|Northwind.sdf?

May 9, 2007

hi,
In the SQL Server 2005 Compact Edition demo, I saw the thing like this:

con = new SqlCeConnection(@"Data Source = |DataDirectory|Northwind.sdf");

What does the |DataDirectory| means? Is it like marco or something? Does it work on windows?

I tried it on windows app, in debug window, it does not change to the real data directory.

Thanks

View 7 Replies View Related

SQLEv && Blobs

Aug 17, 2006

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?

View 5 Replies View Related

SQL Everywhere SLSErver To SQLEv Without SSI && IIS

Jul 15, 2006

Due to client requirements i have found it necessary to write an application that moves data from SQL Server to SQLEv

To do this I open the SQLServer table and using a FOREACH Statement track through the table

I then cast each of the fields I require into a variable

Each record then calls and INSERT INTO statement to insert the data into SQLEV

One serious problem is how do I get round NULLs

ie if contents = (string)ditem["CONTENTS"]; returns a NULL it crashes

So I want something like

IF ditem["CONTENTS"] = NULL

contents = ""

else

contents = (string)ditem["CONTENTS"]



It is very slow the insert statement takes about .7 of a second (although it does seem to speed up)

I enclose a bit of the code

Get the required data

contents = (string)ditem["CONTENTS"];

metrics = (string)ditem["METRICS"];

pickface = (string)ditem["PICKFACE"];

profile = (string)ditem["PROFILE"];

stocktake = (DateTime)ditem["STOCKTAKE"]; //&& ditem["STOCKTAKE"] is DBNull;



// now update the database

this.iTEMTableAdapter1.InsertQuery(

isbom, vendno, item, posloc, desc,

longdesc,size,style,colour,classname,

upccode,upcinner,upcouter,upccase,cuscode ,status,

donhand,dphysical,dnumeric1,dnumeric2,

logic3,logic1,obselete,donorder,

contents,metrics,pickface,profile);

Any ideas please

Richard

View 4 Replies View Related

Where Is DataDirectory ?

Sep 6, 2006

Hello,

I see that one of the new features of SSEv is DataDirectory support.

Where is DataDirectory pointing to? Is it the same directory as the program ".exe" file?

Thank you

Tom



View 16 Replies View Related

Sqlev Maintenance Utility

Aug 21, 2006

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.

View 3 Replies View Related

SQL Compact And |DataDirectory|

Jun 28, 2007

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?

View 6 Replies View Related

Why Minor Diff Makes Big Lag

Mar 31, 2008

The DB Enginee is SQL2005 SP1. In MSSMS

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.

View 4 Replies View Related

DataDirectory Full Vs. Virtual Path

May 3, 2008

Hi

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.

Thanks!

View 3 Replies View Related

Renaming A Project... Some Minor Stuff

Apr 16, 2008

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?



View 7 Replies View Related

Copy And Paste Minor Irritation

Sep 24, 2007

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.

View 1 Replies View Related

I Need To Make A Minor Change To A SQL Server Script That Is In Production. Need Advice So I Don't Screw Something Up.

Mar 1, 2007

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

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved