Sql Server Everywhere Db File And Clickonce

Nov 13, 2006

Hi,

I have been using sql server everywhere for some time now in my desktop application. We use clickonce technology to deploy. I find that each time I update using clickonce my empty db file in the server gets updated with the application. Is it possible to do something such that the db file will not get updated with clickonce if it is present .

Thanks and regards

Arnab

View 1 Replies


ADVERTISEMENT

ClickOnce Path Names Are Too Long For SQL Server Express Identifiers

May 11, 2006

I'm posting this in the ClickOnce forums as well...

My application doesn't include the .mdf and .ldf files, rather it creates the database the first time the application is run using a script that is included in the build. I want to create the database in the ClickOnce data directory. The problem I'm having is that SQL Server complains when I execute the CREATE DATABASE command as follows:



CREATE DATABASE [C:Documents and SettingsxxxxxLocal SettingsApps2.0DataPQCK6EXN.5KGAW630RPT.VGOifie..tion_014028c05b1d6ec6_0001.0002_0e86966f19503c89DataiFieldMobile.mdf] ON PRIMARY
( NAME = N'myDatabase', FILENAME = N'C:Documents and SettingsxxxxxxLocal SettingsApps2.0DataPQCK6EXN.5KGAW630RPT.VGOifie..tion_014028c05b1d6ec6_0001.0002_0e86966f19503c89DatamyDatabase.mdf' , SIZE = 3136KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'myDatabase_log', FILENAME = N'C:Documents and SettingsxxxxLocal SettingsApps2.0DataPQCK6EXN.5KGAW630RPT.VGOifie..tion_014028c05b1d6ec6_0001.0002_0e86966f19503c89DatamyDatabase_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
END

Here's the error:

System.Data.SqlClient.SqlException "The identifier that starts with 'C:Documents and SettingsxxxxxxLocal SettingsApps2.0DataPQCK6EXN.5KGAW630RPT.VGOifie..tion_014028c05b1d6ec6_0001.00' is too long. Maximum length is 128."

View 5 Replies View Related

ClickOnce Please Help

Jun 5, 2007

When having someone run my click once app that is using SQL CE they are getting this message.







The application requires that assembly System.Data.SqlServerCE Version 9.0.242.0 be installed in the global assembly cache (GAC) first

Can someone please let me know what I need to add to prerequisites?

View 3 Replies View Related

Deploy With Clickonce

Dec 23, 2007

Question about deploying a SQL compact database with Clickonce. Deploying the first time is straightforward and that works OK but I am not so sure about consequent releases, how do I deal with the that?
If I mark the file as dont deploy that will, of course, work fine for those that have installed the first release but not for thoses that havent.
What about if I make a change to the database, adding a table for example. How do I go about that? I obviously dont want to loose any of the existing data?

Thx and Happy Christmas to all

View 1 Replies View Related

ClickOnce For SQL Express Database?

Jul 19, 2006

I'm working on an app in Visual Studio 2005 that needs to have installed locally SQL Express to handle its own data.

This app is in a strong upgrading process. I've been using clickonce to publish the app and let my users upgrade automatically (by the way this works amazing ...).

Yet many times changes to the DB are made. Is there a simple way to upgrade their local SQL Express DB like click once does with the app?

Thanks.

View 6 Replies View Related

SQL Express On Vista With ClickOnce

Feb 7, 2007

SQL Express CTP 2 provides a checkbox that will enrol the user installing the software as a database administrator. If the user fails to check this box, they run as an ordinary user, and hence are not allowed to perform functions such as create database.

In the process of deploying an application via ClickOnce, if SQL Express is not present it will be installed automatically. Also, in the process of deploying a ClickOnce application, we should usually expect to need to create a new database. Currently, if the user takes the default install of SQL Express they will not be a database administrator and will not be able to create the database. The installation will thus fail.

Is anything being done with SQL Express for ClickOnce applications deploying to Vista that will allow us to automatically enrol the user installing SQL Express as a database administrator?

View 7 Replies View Related

ClickOnce Private Installation Issue

May 12, 2007

I'm working on a VB.Net 2005 application that uses SQLCE as a backend database.

Following the instructions on how to do a private installation (http://msdn2.microsoft.com/en-us/library/bb219482.aspx) so that admin rights were not needed, I successfully got it working as a ClickOnce deployment. But today during a demo for a client, they ran into this error while installing the latest version from our publishing URL:

"Unable to install or run the application. Application requires that assembly System.Data.SQLServerCe version 9.0.42 .... must be installed in the Global Assembly Cache."



Basically it's saying the user isn't an admin so they can't install. This is the problem I went to great lengths to try to avoid, and is the reason we are using SQL CE in the first place: admin rights are not required to install our application's database. To our knowledge, SQL CE is the only Microsoft product that fits this scenario.

Now, I haven't changed anything in the publishing of the application to my knowledge, and when I check the project prerequisites, the SQLCE engine still isn't in there (as summarized at the above URL). Again following the instructions at the URL above for private installation, the required assemblies are still part of the project's files.

It must be something I did to cause this, but I have no memory of changing anything in regards to this part of the application. Our deadline is in 4 days and I cannot continue development until I get past this issue.

Where do I look to fix this problem? A little help would be greatly appreciated.

View 1 Replies View Related

How Do I Clean Up Database Deleted By ClickOnce With T-SQL?

May 12, 2006

I posted this in the SQL Server Express forum as well...

My app deployed via ClickOnce. It ships with a database creation script which creates the database in the ClickOnce data directory. Upon uninstall, the entire data folder is deleted successfully. But if you then reinstall the app, SQL Server Express still thinks the database exists. Right now, to get a re-install to work, I have to go into Management Studio Express, click on the db (get an pop-up error as the physical db file is no longer there) and then click delete.

So my question is... what system proc should I execute in the db creation script before I run the CREATE DATABASE command?

View 1 Replies View Related

Compacting A SQL CE Database Programmatically In A ClickOnce Application

May 12, 2008



I'm trying to compact a SQL CE database programmatically. I've copied the code from MSDN, and it's fine as far as it goes, but there's a problem tying to compact a database in a ClickOnce application because you don't know the path to the database. You have to use the "|DataDirectory|" in your connection string to signify the path to the database. But when I try the file operations to replace the old database with the compacted version, I get an error message that the path "|DataDirectory|" is not valid. Here's the code:


SqlCeEngine engine = new SqlCeEngine("Data Source = " + src + "; Password =" + txtPassword.Text);

try

{


engine.Compact("Data Source = " + dest + "; Password =" + txtPassword.Text);

ShowMsg("Compacting...", MsgType.NoError);

}

catch (Exception ex)

{


MessageBox.Show("There was an error completing the operation: " + ex.Message);

}

engine.Dispose();

File.Delete(src);

File.Move(dest, src);



(dest is = src + ".tmp", i.e., a path to a tmp file to hold the database while compacting).

How do I locate the files to copy if I can't use "|DataDirectory|"?

View 3 Replies View Related

Deploying SQL Express Database Files With ClickOnce App Using OLE

Jan 18, 2008



I've written a ClickOnce app that deploys a Sql Server Express data file (.mdf) and log file (.ldf) along with the other application files. SQL Express SP2 is a prerequisite for this app. After the applicaiton installs and starts up it copies these files to a specific folder and attaches them by calling the AttachDatabase() method of a Microsoft.SqlServer.Management.Smo.Server object.

This method works fine using Windows XP, however when I run it on Windows Vista I get the following exception:

Microsoft.SqlServer.Management.Smo.FailedOperationException: Attach database failed for Server 'localhostSQLEXPRESS'. ---> Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: Unable to open the physical file "C:WashMasterDatabasewasshmaster.mdf". Operating system error 5: "5(Access is denied.)".

This exception occurs when I try to programmatically attach the database.

I've searched through the MSDN forums for a solution and I've only found two suggestions:

1.) Create all database connections using a User Instance.
2.) Create the database (using SQL) in the target folder, rather than copying it over from the deployment folder.

I don't like the idea of using User Instances because my entire data access layer is currently written using Ole and I would rather not rewrite it if I don't have to. I cannot find any way to use User Instances with Ole.

I also don't like the idea of creating the database using SQL because it is fairly large.

Here are my questions:

1.) Can User Instances be used with Ole?

2.) Can I somehow programmatically set the permissions of the copied data and log files so that SQL Express can access them without error?

3.) Is there a better method for doing what I'm trying to do or am I destined to have to either rewrite in data access layer so I can use User Instances or create my large database rather than copy it to the target directory?

Thanks.

View 4 Replies View Related

Rights For Clickonce Report Builder Access?

Feb 7, 2007

I'm attempting to grant rights to Report Builder as deployed as part of my TFS install. My problem is that I have to add my users to the builtinadmin group in order for them to see the report builder button on the SQL Server Reporting homepage & then have rights to launch the ReportBuilder click once app. I obviously do not want make users admins on the box, but I've tried adding them to all of the other groups having to do with SQLServer to no avail. How can I grant users access to launch the Report Builder app?

View 6 Replies View Related

SQL Espress 2005 Service Pack1 With ClickOnce Application

Nov 21, 2006

Hi all,

I use SQL Express 2005 with my application that is deployed to the customers with the ClickOnce technology.

Now I want to upgrade automatically the SQL Express to che customers deployed with the Service Pack1.



How can I automated this process?



Thanks,

Bonato Pierantonio

View 1 Replies View Related

Help With Connection String After Clickonce Install From Visual Studio 2005

Apr 7, 2008

I have a sql express .mdf that is located in c:appdirectorymydb.mdf whilst developing an application. During development my connection string uses the above path to connect to the db. e.g.

"server = .sqlexpress; Integrated Security=True; database=C:appdirectorymydb.mdf"

I have published the app using click once in visual studio.net which places the db in : C:Documents and Settingsuser.nameLocal SettingsApps2.0DataJN1WL1DJ.X7B ... 08ed2810aab2abData


When i am executing the application following a clickonce install, what should I use in my connection string for the path to the db ? or where can I find the above path (e.g. in the registry) so that I can provide it to the connection string ?


Alternatively, can I specify where the DB is going to be installed (via click once). e.g. in my app directory under program files ?

I have tried searching what seems like everywhere for a solution to this problem and as a last resort thought it worth posting the question.

Many thanks in advance.

Simon

View 1 Replies View Related

SQL Server 2012 :: Write A Process To Get File Size In Kb And Record Count In A File?

Jul 31, 2014

I need to write a process to get file size in kb and record count in a file. I was planning on writing a c# console app that takes the file path and name as a param however should i use a CLR?

I cant put a script in the ssis when it's bringing the file down because it has been deemed that we only use ssis for file consumption.

View 1 Replies View Related

SQL Server Admin 2014 :: Creating Additional Data File For A Particular File Group?

Jul 6, 2015

For a database, we have 4 data files in a particular file group and the file sizes are almost 70 GB each.

Do I come across any performance issues if I create/pre-allocate an additional data file in the same file group so that the existing files don't grow too much?

View 5 Replies View Related

SQL Server Admin 2014 :: Can Delete A Data-file Or File-group

Apr 27, 2015

In a server we had File Growth,And then We had to Add New Hard Drive And New File On It.And Now We have New server with a Huge Hard Drive.But all files remaind.Can I Reduce This files to One data file or not ?

View 3 Replies View Related

How To Convert SLQ Server Express Database File To SQL Compact Edition File?

May 29, 2007

Hi all,



I have a database name MyDatabase (SQL Server Express Dabase File). Is there anyway that I could convert it to SQL Server Compact Edition File?



By the way does anyone here got any problem with programming in SQL Server Compact Edition? It troubles me.



Thanks,

bombie

View 6 Replies View Related

File System Task Error When Using SQL Server Agent (when Move File On Network Drive)

Jun 8, 2007

I am able to run SSIS packages as SQL Server Agent jobs with a Control Flow items "File system task", if I move a file (test.txt) from a drive (c on the server (where SQL Agent jobs run) to a subdirectory on the same drive. But, if I try to move a file on a network drive, the package fail.



What I can do to solve this issue.



Bye!

Daniel

View 1 Replies View Related

SQL Server 2008 :: SSIS Copy File From SharePoint Library Using File System Task Permissions?

Jun 19, 2015

Historically I've always written a VB script to copy a file from a sharepoint library. I don't like this method because I have to input a username & password in the script and maintain a config file.

Yesterday I was playing around with using a file system task. The sharepoint file has a UNC path so why not? I created a simple test package with a single file system task that copies the sharepoint file (addressed via UNC) to another network location. Package runs fine locally.

I try running on our utility server but am getting a "The file name [SHAREPOINT UNC PATH] specified in the connection was not valid" error. Package is running with a proxy on the server and the proxy account has the same permissions to the sharepoint site (so far as I can tell) as me.

View 0 Replies View Related

SQL Server 2008 :: Log File Space Is 5 Times The Data File

Mar 16, 2015

one of my database data file is 100 GB and the log file is 500 GB.DB is in full recovery model and the transaction logs happen once in 6 hours.Even then, the Database log file isn't reducing in size.

View 9 Replies View Related

Deploy Excel File That Already Exists On Server - File Isn't Replaced

Jan 3, 2007

Dear all,



I am deploying programatically an Excel 2007 file to a SQL Server 2005 Reporting Server. The problem is that if a file with the same name already exists, that file isn't replaced. I would like the opposite to happen. I'm using the following code:

--Executable

set svr=http://w3sdwsqld1/reportserver
set src_fld="\w3sdwsqld1\deploy\SAD\ECRANS\UPDATES_20061127_190000\Ecrans\AM\Associados\"
set dest_fld="Associados"
set script="\w3sdwsqld1\deploy\SADECRANS\UPDATES_20061127_190000\Ecrans\AM\Associados\PublishReports.rss"
REM Sample: deploy.bat http://w3sdwsqld1/reportserver "\w3sdwsqld1\deploy\SAD\ECRANS\UPDATES_20061127_190000\Ecrans\AM\Associados\" "Associados" "\w3sdwsqld1\deploy\SADECRANS\UPDATES_20061127_190000\Ecrans\AM\Associados\PublishReports.rss"
for /R %src_fld% %%f in (*.xlsx) do rs -i %script% -s %svr% -v ParentFolder=%dest_fld% -v reportP="%%~nf" -v path=%src_fld%
PAUSE


--rss Code


'
' Script Variables
'
' Variables that are passed on the command line with the -v switch:
'
' (a) parentFolder - corresponds to the folder that the script creates and uses
' to contain your published reports

' (b) reportP - corresponds to the report to publish


Dim ROOT As String = "/SAD/Ecrans/Ecrans/AM"



Dim definition As [Byte]() = Nothing
Dim warnings As Warning() = Nothing
Dim parentPath As String = ROOT + "/"+ parentFolder
Dim filePath As String = path
Dim report As String = reportP


Public Sub Main()

rs.Credentials = System.Net.CredentialCache.DefaultCredentials

'Create the parent folder
Try
rs.CreateFolder(parentFolder, ROOT,Nothing)
Console.WriteLine("Parent folder {0} created successfully", parentFolder)
Catch e As Exception

Console.WriteLine(e.Message)

End Try



'Create shared data source
'CreateSampleDataSource("Solucao_Integrada", "OLEDB-MD", "Data Source=dwareas1;Initial Catalog=SAD_Solucao_Integrada")


'Publish the sample reports
PublishReport(report)


End Sub

Public Sub CreateSampleDataSource(name As String, extension As String, connectionString As String)
'Define the data source definition.
Dim definition As New DataSourceDefinition()
definition.CredentialRetrieval = CredentialRetrievalEnum.Integrated
definition.ConnectString = connectionString
definition.Enabled = True
definition.EnabledSpecified = True
definition.Extension = extension
definition.ImpersonateUser = False
definition.ImpersonateUserSpecified = True
'Use the default prompt string.
definition.Prompt = Nothing
definition.WindowsCredentials = False

Try
rs.CreateDataSource(name, parentPath, False, definition, Nothing)
Console.WriteLine("Data source {0} created successfully", name)

Catch e As Exception
Console.WriteLine(e.Message)
End Try

End Sub

Public Sub PublishReport(ByVal reportName As String)
Try
Dim stream As FileStream = File.OpenRead(filePath + reportName + ".xlsx")
Console.WriteLine(reportName)

definition = New [Byte](stream.Length) {}
stream.Read(definition, 0, CInt(stream.Length))
stream.Close()

Catch e As IOException
Console.WriteLine(e.Message)
End Try

Try
rs.CreateResource(reportName + ".xlsx", parentPath, True, definition, "application/x-excel", Nothing)

Catch e As Exception
Console.WriteLine(e.Message)
Console.WriteLine("Failed to publish report")
End Try
End Sub
--------------------------------------------------------------------------------------------------------------------

Any thoughts? Many thanks,

Pedro Martins

Portugal

View 3 Replies View Related

Transact SQL :: Why Does File Seem Displaced When Send Server Results To A File

Aug 24, 2015

I have the following SQL

IFOBJECT_ID('tempdb..#TempTable_Lockbox_File_Header_Record')IS NOTNULLDROP TABLE#TempTable_Lockbox_File_Header_Record
;
IFOBJECT_ID('tempdb..#TempTable_Lockbox_Batch_Header_Record')IS NOTNULLDROP TABLE#TempTable_Lockbox_Batch_Header_Record
;

[code]....

When I send my query results to a file in SQL Server Management Studio, how come I'm seeing the following in Notepad++? FH   TEST "FH" which I thought should be in a CHAR(2) data column is there but "TEST" seems to start in Column 6...not column 3 as I would have expected. I was expecting... FHTEST.

View 3 Replies View Related

Management Studio Express && SQLcmd: Syntax Errors In Executing A MS-DOS Batch File && A Microsoft SQL Server Query File?

Nov 2, 2007

Hi all,
I have the "Northwind" database in my Sql Server Management Studio Express.

In my C:ProSSEAppsSamplesForChapter02Chapter02 folder, I have the following 2 files:
(1) ListColumnValues (MS-DOS Batch File)
sqlcmd -S .sqlexpress -v DBName = "Northwind" CName = "CompanyName" TName =
"Shippers" -i c:prosseappschapter02ListListColumnVales.sql -o
c:prosseappschapter02ColumnValuesOut.rpt
(2) ListColumnValues (Microsoft SQL Server Query File)
USE $(Northwind)
GO
SELECT $(CompanyName) FROM $(Shippers)
GO
When I ran the following SQLcmd:
C:ProSSEAppsSamplesForChapter02Chapter02>ListColumnValues.bat
I got the following "ColumnValuesOut.rpt" with error messages:

'Northwind' scripting variable not defined.
Msg 102, Level 15, State 1, Server L1P2P3SQLEXPRESS, Line 1
Incorrect syntax near '$'.
'CompanyName' scripting variable not defined.
'Shippers' scripting variable not defined.
Msg 102, Level 15, State 1, Server L1P2P3SQLEXPRESS, Line 1
Incorrect syntax near 'CompanyName'.

I copied these T-SQL statements from a book and I do not know how to correct them.
Please help and tell me how to correct these errors.

Thanks in advance,
Scott Chang




View 3 Replies View Related

How Read File CSV File In Remote Server Using Bulk

Mar 24, 2008

Hi All,

I need to read a csv file, which is in remote server using SQl Bulk Insert Command.

Can I read a file Which is in remote server using BULK INSERT.

Thank you.......

View 1 Replies View Related

Converting Mdb (Access File) File To A SQL Server Database

May 14, 2008



hello,

I'm not really sure my question belongs to here...

I have a database in Access (from microsoft office, of course), and I want to transfer convert it to SQL Server.
Does anyone know how I can do it? It must be very simple, but I haven't found it yet....

Thanks a lot!

- Miri

View 7 Replies View Related

Convert A Btrieve File To A Sql Server File

Jul 20, 2005

how can i convert a file from kind btrieve to a sql server 2000 file and usedthat files in sql server 2000thank you from your answer

View 1 Replies View Related

.NET Framework :: Convert BAK File In Server To CSV File

Aug 31, 2015

I need to write a code in asp.net to convert .bak file in sql server to .csv file...

View 6 Replies View Related

Shrinking .ldf File And .mdf File In Sql Server

Jan 27, 2008



please advice me what does .ldf file consist of and can i shrink the .ldf , is it adviceble to shrink after the backup and how frequently it can be done on a production db



please advice me ,can i shrink the .mdf , it is adviceble to shrink after the backup and how frequently it can be done on a production db


Thanks

View 4 Replies View Related

How Read CSV File In Other Server Using Bulk Insert Command In Sql Server In Different Server...

Mar 24, 2008

Hi All,
 Please some one help me...
I have to insert a csv into one table in sql server. But the problem is the file is in one server and SQL SERVER 2005 is in other server..
 how do i insert the file....
please help me.....
 

View 1 Replies View Related

Mdf File On A File Server

Jan 10, 2008

I have written my application in vb.net with the data file being a sql server .mdf file currently stored on my hard drive using an instance of sql express.

However the intention is to have the file on a file server so that the client will be on users computers and the database on the server.

I just tested my app with the .mdf file on a file server and got this error:

The file "\mazepcc$DeveloperTestDBTestSQL.mdf" is on a network path that is not supported for database files.
An attempt to attach an auto-named database for file "\mazepcc$DeveloperTestDBTestSQL.mdf" failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Oh please PLEASE tell me I can access an mdf file on the network!!

I am in BIG s**t if it it is not possible.

If not can anyone please suggest a way to save my bacon?

For the record a SQL Server instance on this or any other server is out of the question!

I thought that as VS.NET provided all the divers etc it would work.

I am in meltdown panic mode!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

View 20 Replies View Related

Creating A SQL Server 2000 Compatible .BAK File From SQL Server Management Studio Express

Jul 11, 2007

Hi,My webhost (1and1) is running SQL Server 2000 and their web tool supports the import of .bak files. However, when I try to import my .bak files created in SQL Server Management Studio Express I get the following error:"The backed-up database has on-disk structure version 611. The server
supports version 539 and cannot restore or upgrade this database.
RESTORE FILELIST is terminating abnormally."I have  Googled this error and learnt that 2005 .bak files are not compatible with 2000 .bak files. I'm just wondering if there are any work arounds to this or alternative tools that I can create 2000 compatible .bak files from from 2000/2005 .mdf files.Thanks in advance.   

View 4 Replies View Related

SQL Server 2008 :: Load Latest CSV Files From File Server Automatically

Feb 4, 2015

I need to load the latest csv files from file server , The files are placed in a folder called -

Posted 02022015- --> csv files .

I am able to copy the csv files from filserver using bulk insert (manually) , giving the file location

I am having difficulty picking up the latest folder which is posted on the server and import it into database using a stored proc .

View 2 Replies View Related

Cant Sort Data In Exported Excel File From Sql Server Reporting Server

Feb 7, 2008



Hello,
I am new to this sql server reporting server technology. I have a requirement like the table header should repeat in all pages of the exported excel's print preview. So I have created the header columns with fixed lenths as same as table's header in the page header of the report. Then only the Header will repeat in all pages of the print preview.

But the problem is when doing like this, many of the columns have been merged together. The report layout is ok. But cant sort the data. It says a message "This operation requires the merged cells to be identically sized."

In some forms i have found the header control's edges need to be sized identically with the tables' columns edges. I did it. But still the columns are merged when exporting.


Please help me out from this.


Thanks in advance.

View 5 Replies View Related







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