Access To The Database File Is Not Allowed. [ File Name = ],[,,] Happens In VS2005 Environ But SSMSE Is Ok?

Jul 20, 2007

I am developing a C# mobile 5.0SDK app that utilizes SQL2005 Compact Edition device files on Vista using as far as I know the latest SPs and versions.



Last night, I could open tables from the Server Explorer .sdf file, see the contents, edit the schema, etc. Now today, I assume all of a sudden,I am able to open schema but cannot open the table to see the contents. I get:



Microsoft SQL Server 2005 Compact Edition captioned error dialog box that says "Access to the database file is not allowed. [ File name = ],[,,]



Using Sql Server 2005 Management Studio Express, I can open the table, do queries etc. I have tried rebooting, deleting, opening old projects, deleting dataset, disconnecting mobile device, but I still get the same error. I have tried stopping the SQL Server(SQLEXPRESS) service on the server but get:



Cannot open MSSLQ$SQLEXPRESS service on computer 'p5w64'. Access is denied.



I have no idea what to do next to start moving forward again, other than try the XP environment which I will do next.



Has anyone experienced this problem?



Thank you.







View 9 Replies


ADVERTISEMENT

Access To The Database File Is Not Allowed.

Sep 23, 2007

I'm connecting to an Sql Compact database (3.1) from a C# assembly exposed via COM and called from inside a winsock LSP. The database is only used once on instantiation of the class, which happens in the first call to WSPStartup.

The issue I'm having is that under Vista and when running inside IE7 I get the error in the title. However there is no problems with IE7 under windows XP, or with Firefox and MSN Messenger under XP or Vista!

When selecting to run IE as administrator, the problem dissapears, however when using the LogonUser API to impersonate an administrator it doesnt.

This would seem like a permissions issue, strange though that Firefox under vista has no problems.. Also, the following code throws no SecurityException under either browser, indicating the code is running with full trust.

new PermissionSet(PermissionState.Unrestricted).Demand();


Any input would be a huge help, I've been banging my head against this all day..

View 4 Replies View Related

Access To The Database File Is Not Allowed

Apr 10, 2008



Dear Sirs.

I have Written WinForm Application that uses SQL Server Compact 3.5.
I also deploy Database (SDF) File with this application.
Installation Package Created Using InstallShield 2008.


I Deployed SDF in Common App Data Folder. In Administrator mode Application is working fine.
But in User Mode I Get Error Message.

"Access to the database file is not allowed.
[ File name = C:Documents and SettingsAll Users
Application DataGeorgian MicrosystemsCodex 2007 R2 Russian
DatabaseCodexRussian2007.sdf ]"

I Also Tested That Application in user mode Can Create File in ("C:Documents and SettingsAll Users
Application DataGeorgian MicrosystemsCodex 2007 R2 Russian
Database") Directory.


Test Environment is XP SP2


I Tryed to Copy SDF file manualy. Appplication in user mode can access on it if file is copyed in user mode.
if this file is copyd in Administator mode even in users Local Directory SQL Engine can't access on it.


Please Help me to Slove this problem.

How to connect using user mdoe to SDF deploed with admin right. (MSI installer).


Thank you in advance.

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

An Attempt To Attach An Auto-named Database For File (file Location).../Database.mdf Failed. A Database With The Same Name Exists, Or Specified File Cannot Be Opened, Or It Is Located On UNC Share.

Sep 2, 2007

Greetings, I have just arrived back into the country (NZ) and back into ASP.NET.
 I am having trouble with the following:An attempt to attach an auto-named database for file (file location).../Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
It has only begun since i decided i wanted to use IIS, I realise VWD comes with its own localhost, but since it is only temporary, i wanted a permanent shortcut on my desktop to link to my intranet page.
 Anyone have any ideas why i am getting the above error? have searched many places on the internet and not getting any closer.
Cheers ~ J
 

View 3 Replies View Related

Build CAB File For Win CE .Net 5.0 W/ VS2005 ?

Apr 3, 2007

I have create an application with VS2005, but couldn't build the cab file as said in Books On Line: Build > Build CAB file.



So how can I build a package to deploy the application on my device with vs2005?



Thanks for helping me out.



jd

View 1 Replies View Related

Sql Server CE Cab File Deployment VS2005

Sep 13, 2007

Hello All,

I had VS2005 in my machine and was working with a mobile device using Sql Server CE. While compiling and deploying device application to my mobile device it used to deploy the Sql Server CE cab files also.
But now i have migrated to another machine ( Vista OS ) and installed VS2005 newly etc., Now when i try out the deployment of device application to my mobile device it is not deploying the Sql Server CE cab files but just copies the SqlServerCe dll file.
So when my application launches in the mobile device i get an error can't PInvoke sqlceme30.dll etc.,

I know that i can manually copy the cab files to my device and work. Its little tedious. Can anyone tell me how to achieve the behavior of my old VS2005 wherein it automatically deploys the SqlServer CE cab files? Is there a setting in VS2005 to enable this. I read in one of the posts that we can go modify the option Tools->Options->Smart device and enable an option to deploy the latest updates etc., But i couldn't find such an option in my VS2005.

P.S: I have installed my SqlServer Mobile edition 3.0 SDK to the default path under program files. Should i install it under VS2005 smartdevices SDK or something like that? I tried that also but still no success.

View 2 Replies View Related

How To INSERT Decimal Value Into A .DBF File Using VS2005

Feb 20, 2007

Hi,

I use this code to connect into my Database:

db2 = New ADODB.Connection

dbConn = "Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=C:PATH;

Exclusive=NO;Collate=Machine;NULL=YES;DELETED=NO;

BACKGROUNDFETCH=YES;"

db2.Open(dbConn)

 
inside my app, I use this command to INSERT into .DBF named testInsert.DBF,
the testInsert.dbf has the feilds of: Name( string format) & Amount(Decimal format)

 

Dim Conn as String

Conn="INSERT INTO testInsert.DBF VALUES ('shippers06','625.06')"

rs.Open(Conn,db2)

In this Coding, the VS2005 returms me an error of "DATA TYPE mismatch"

I try to Convert the value 625.06 to Decimal but it just don't work...

Please HELP a noobie like me in finishing this app...

Thnx in Advance

View 2 Replies View Related

Different File Save Location When Used As A Scheduled Job Than In VS2005

Oct 5, 2006

I have an SSIS package that I created that looks like the following:

Execute SQL Task [Determines the file name]

Data Flow Task
Source - Query [Grabs the data]
Destination [Saves data to file on network drive]

Send Mail Task [Tells user to get file from network]
When I run this package inside Microsoft
Visual Studio I get the results I want. It sends the file to the
network drive and because there are SSN's in the file, it doesn't
actually e-mail the file but puts it in a secure location for the
person to get the file.

When I schedule this in SQL Server 2005 I get the file saved to: c:windowssystem32dynamicfilename.csv

So somehow it is still able to determine what the file name should be, but instead of sending the file to the right destination when you run it through VS, it flops out and sends it to this wacky directory.

I've
spent too much time on this and was wondering if someone can point me
in the right direction without going to the extent of writing a script
like this suggests. thread1555-1265108

Thanks,
Keith

View 6 Replies View Related

The Database File May Be Corrupted. Run The Repair Utility To Check The Database File. [ Database Name = SDMMC Storage Cardwinp

Oct 9, 2007

yes,I have an error, like 'The database file may be corrupted. Run the repair utility to check the database file. [ Database name = SDMMC Storage Cardwinpos_2005WINPOS2005.sdf ]' .I develope a program for Pocket Pcs and this program's database sometimes corrupt.what can i do?please help me

View 4 Replies View Related

Send Sql Statement From Vs2005; Detach A Mdf File From Sql Server Express

Sep 17, 2007



Hi,

as I'm relatively new to Sql Server Express, I have a few questions regarding best practices for data handling.

In my ASP.net Application I thought it might be of high value to create the database as mdf file in my vs2005 project,
so I could easily copy the database with the project.

Now inside VS2005 I have the problem of not being able to create any SQL Statements other than queries. For example simple create table statements and such seem not to be possible if I don't want to use the designer.

So I attached the mdf file to my Sql Server Express in Sql Management Studio Express.
But here I seem not be able to detach the file again when I made some changes. Only option is to delete the whole thing.


So my questions are:

1. Is it somehow possible to send simple sql statements to a sql server express database from Visual Studio 2005?
2. How can I detach an mdf database file from Sql Server Express once I have attached it with Sql Management Studio Express?
3. Should I use a different approach to my problem?


thank you all in advance

View 1 Replies View Related

Access Database Datatypes, ADOX And VS2005 Question

Jun 28, 2007



I'm using ADOX 2.8 for table creation: The following is an example of a column defintion:





If CreateNewTable Then CreateNewTable = a.CreateColumn("ReferenceCount", ADOX.DataTypeEnum.adInteger)

If CreateNewTable Then CreateNewTable = a.CreateColumn("Document", ADOX.DataTypeEnum.adLongVarBinary) 'Oleobject

If CreateNewTable Then CreateNewTable = a.CreateColumn("EntityID", ADOX.DataTypeEnum.adWChar, 18) 'text



Where CreateColumn looks like this:


Public Function CreateColumn(ByVal ColumnName As String, ByVal Datatype As ADOX.DataTypeEnum, Optional ByVal Size As Integer = 0) As Boolean

'ADOX.CreateColumn - Called by Common.CreateNewTable
'CreateColumn creates a column described in the Table object so it assumes it is set.
'One method of setting it is to call Select Table after opening the database

If Not Me.ConnectionIsOpen Then
MsgBox("CreateColumn - Failed to Create Column : " _
& ColumnName, MsgBoxStyle.Exclamation, cNoConn)
Return False
End If

Dim col As New ADOX.Column
col.Name = ColumnName
Try
col.Type = Datatype
Catch e As Exception
MsgBox("CreateColumb - Failed to Create Column : " _
& ColumnName, MsgBoxStyle.Exclamation, e.Message)
col = Nothing
Return False
End Try

If Size <> 0 Then col.DefinedSize = Size
Try

Table.Columns.Append(ColumnName, Datatype)

Catch e As Exception
If Err.Number() <> 0 Then
MsgBox(Err.Source & "-->" & Err.Description, , "Error")
End If
MsgBox("CreateColumb - Failed to Append Column : " _
& ColumnName, MsgBoxStyle.Exclamation, e.Message)
Return False
End Try
col = Nothing
Return True
End Function


in CreateColumn("EntityID", ADOX.DataTypeEnum.adWChar, 18)

the 18 specifies the field width in the database. Yet no matter whether I use adWChar or

adVarWChar, Access always shows the field size to be 255.



Does anyone know why or how to fix that?

View 1 Replies View Related

ASP.net, Database File, Process Cannot Access The File Because It Is Being Used By Another Process

Mar 19, 2008

Hi I am using VWD 2008, SQL Express 2005, Reporting Services, Win-XP, IIS5Basically let's say I have 2 pages:Page1: has a SQLDataSource control that populates a GridView from a table from a database file myDB.mdf  (no code behind)Page2: has a reportviewer control that show a report with data from the same table from myDB.mdf from the reportserver, (no code behind)I have attached myDB.mdf to the SQL Server Express using the SQL Server Management Studio Express.If I first open Page2 to display the ReportViewer it works ok. or using the Report ManagerNow this is the problem:If after that I try to open Page1 then a get an error message:Cannot open user default database. Login failed.Login failed for user 'myServerASPNET'. Exception Details: System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.Login failed for user 'myServerASPNET'.Then I have to restart the SQL Server to fix it,Now I can open Page1 ok, but if after this I try to open Page2 (ReportViewer) againThen I get this error:"      An error has occurred during report processing. o      Cannot create a connection to data source 'my_Datasource'.  &And this error if open the report using the report manager:"      An error has occurred during report processing. o      Cannot create a connection to data source 'my_Datasource'. §      Unable to open the physical file "C:InetpubwwwrootWebsiteApp_DatamyDB.mdf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".  &Now if i check the Management Studio Express again, you can see that myDB.mdf was detached. It seems to be there by it has no Tables or definitions, so I have to attach it again..Do you know how to fix this?Thanks in advance,Ed

View 5 Replies View Related

Access To Database File Is Not Permitted.

Jan 31, 2008

I've done some programming before, but i'm pretty much a novice in C#. I recently installed Visual Studio 2008 Express Edition. For some reason, when i came to a point to make a connection with an SQL Sample database "NORTHWIND.SDF".... An error message show up saying "access to database file is not permitted". What causes it.???

View 1 Replies View Related

How Do I Protect Access Database (MDB File)?

Apr 16, 2007

I have developed a small desktop application using c# and Ms Access 2002. Database is password protected and contains sensitive data. As many password retrieval tools are available, What should I do to protect Ms-Access (.MDB ) file? Is there any way through which I can hide database file

View 3 Replies View Related

Package Configuration File Issue - Relative Path Not Recognized In VS2005

Feb 7, 2008

I have been reading through different posts about how to manage SSIS configuration files across multiple environments. I have seen a few that mention a solution that turns out not to really work (or maybe I€™m doing something wrong); which is what I hope to find out here.

Solutions I am working with:
1: Put the XML Configuration file in the same directory as the SSIS package and only specify the config file name when setting it up in the package. I do not specify a path to the XML Configuration file, just the config file name.

ISSUE: This works when I first create the package and test it without closing down visual studio. Even after deploying the SSIS package and the config file and moving it between environments it works as long as the working directory of the DTExec command is the same directory as the SSIS package and configuration files. The problem comes in after I have closed Visual Studio and opened it again and loaded up the SSIS package. It then gives a bunch of errors stating that it can€™t locate the configuration files€¦. If I could fix this issue, then this would be a solution that I could live with. (I would much rather use a relative path to a different directory but I€™ll live with what I can get). Can anyone solve the issue of Visual Studio 2005 not recognizing the location of the configuration files when only the configuration file name, and not the path is specified?

-- The other odd thing is that I have been able to get this to work consistently with some of my packages but not others. I'm not sure what I did to get those packages to recognize the location of the xml config file.

Thank you in advance for any input and help.

View 27 Replies View Related

An Attempt To Attach An Auto-named Database For File...failed. A Database With The Same Name Exists, Or Specified File Cannot Be

Mar 24, 2006

I know allot of folks are having this problem and I tried lots of things but nothing works. I understand the problem is coping the SQL Express on another server is the problem - I just not sure what to do?

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

This is the last statement on the Stack Trace:

SqlException (0x80131904): An attempt to attach an auto-named database for file e:wwwdata81d0493fwwwApp_DataTestDatabase.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735091

I checked my server forum and they said I had to name a database:
Example: Database=(unique name);

But this didn't work either.

I just tried a simple web project that has only one database and one table in SQL Express with one sqldatasource and one datagrid. It works fine on my pc but when I use the copy function in Visio Studio 2005 Pro - I can't run the site on the remote server: www.myjewelrydirect.com

I tried coping the database manually. I tried disconnecting the database before I copy it. Below is my connection statement:

<connectionStrings>
<add name="TestDB" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|TestDatabase.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>

With all the comments in these forums - this must be a bug.

I have been working on this problem for over 2 weeks - HELP!



View 1 Replies View Related

SQL Security :: Can't Open Database File Access Denied

Aug 17, 2015

Event 17204, FCB::Open failed: Could not open file F:MSSQLDatafilename.mdf for file number 1.  OS error: 5(Access is denied.).When I look at the file permissions of filename.mdf, there is no MSSQLSERVER group permissions listed nor can I add it. I have tried to add MSSQLSERVER and NT SERVICEMS SQL $MSSQLSERVER but neither exist. There is also a ReportServer.mdf in the same folder with MSSQLSERVER permissions!Did I somehow delete this group? What can I do to restore this permission?

View 6 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

How Do I Insert Data From A Flat File Or .csv File Into An Existing SQL Database???

Mar 29, 2006

How do I insert data from a flat file or .csv file into an existing SQL database???

Here what I've come up with thus far and I but it doesn't work. Can someone please help? Let me know if there is a better way to do this... Idealy I'd like to write straight to the sql database and skip the datset all together...

strSvr = "vkrerftg"

StrDb = "Test_DB"

'connection String

strCon = "Server=" & strSvr & ";database=" & StrDb & "; integrated security=SSPI;"

Dim dbconn As New SqlConnection(strCon)

Dim da As New SqlDataAdapter()

Dim insertComm As New SqlCommand("INSERT INTO [Test_DB_RMS].[dbo].[AIR_Ouput] ([Event], [Year], [Contract Loss],[Company Loss], " & _

"[IndInsured Loss Prop],[IndInsured Loss WC],[Event Info]) " & _

"VALUES (@Event, @Year, @ConLoss, @CompLoss, @IndLossProp, @IndLossWC, @eventsInfo)", dbconn)

insertComm.Parameters.Add("@Event", SqlDbType.Int, 4, "Event")

insertComm.Parameters.Add("@Year", SqlDbType.Float, 4, "Year")

insertComm.Parameters.Add("@ConLoss", SqlDbType.Float, 4, "Contract Loss")

insertComm.Parameters.Add("@CompLoss", SqlDbType.Float, 4, "Company Loss")

insertComm.Parameters.Add("@IndLossProp", SqlDbType.Float, 4, "IndInsured Loss Prop")

insertComm.Parameters.Add("@IndLossWC", SqlDbType.Float, 4, "IndInsured Loss WC")

insertComm.Parameters.Add("@eventsInfo", SqlDbType.NVarChar, 255, "Event Info")

da.InsertCommand = insertComm

Dim upComm As New SqlCommand("UPDATE [Test_DB_RMS].[dbo].[AIR_Ouput] " & _

"SET [Event] = @Event " & _

",[Year] = @Year " & _

",[Contract Loss] = @ConLoss " & _

",[Company Loss] = @CompLoss " & _

",[IndInsured Loss Prop] = @IndLossProp " & _

",[IndInsured Loss WC] = @IndLossWC " & _

",[Event Info] = @EventInfo", dbconn)

upComm.Parameters.Add("@Event", SqlDbType.Int, 4, "Event")

upComm.Parameters.Add("@Year", SqlDbType.Float, 4, "Year")

upComm.Parameters.Add("@ConLoss", SqlDbType.Float, 4, "Contract Loss")

upComm.Parameters.Add("@CompLoss", SqlDbType.Float, 4, "Company Loss")

upComm.Parameters.Add("@IndLossProp", SqlDbType.Float, 4, "IndInsured Loss Prop")

upComm.Parameters.Add("@IndLossWC", SqlDbType.Float, 4, "IndInsured Loss WC")

upComm.Parameters.Add("@EventsInfo", SqlDbType.NVarChar, 255, "Event Info")

da.UpdateCommand = upComm

da.Update(dsAIR, "TextDB")



************* ANY HELP WOULD BE GREATLY APPRECIATED************

THANKS

View 6 Replies View Related

DB Engine :: Recommended Size And File Growth For A Database And Log File?

Sep 22, 2015

What is the recommended size and file growth for a database and log file? We will be storing approx 10000 records a day.Currently we have the following:

CREATE DATABASE Dummy
ON 
PRIMARY
( NAME = Dummy_data,
    FILENAME = 'D:....DATADummy.mdf',
    SIZE = 250MB,
    FILEGROWTH = 25MB )
LOG ON
( NAME = Dummy_log,
    FILENAME = 'D:....DATADummy_log.ldf',
    SIZE = 50MB,
    FILEGROWTH = 5MB ) ;
GO

View 3 Replies View Related

How Do I Insert Data From A Flat File Or .csv File Into An Existing SQL Database???

Mar 29, 2006



How do I insert data from a flat file or .csv file into an existing SQL database???

Here what I've come up with thus far and I but it doesn't work. Can someone please help? Let me know if there is a better wway to do this... Idealy I'd like to write straight to the sql database and skip the datset all together...

strSvr = "vkrerftg"

StrDb = "Test_DB"

'connection String

strCon = "Server=" & strSvr & ";database=" & StrDb & "; integrated security=SSPI;"

Dim dbconn As New SqlConnection(strCon)

Dim da As New SqlDataAdapter()

Dim insertComm As New SqlCommand("INSERT INTO [Test_DB_RMS].[dbo].[AIR_Ouput] ([Event], [Year], [Contract Loss],[Company Loss], " & _

"[IndInsured Loss Prop],[IndInsured Loss WC],[Event Info]) " & _

"VALUES (@Event, @Year, @ConLoss, @CompLoss, @IndLossProp, @IndLossWC, @eventsInfo)", dbconn)

insertComm.Parameters.Add("@Event", SqlDbType.Int, 4, "Event")

insertComm.Parameters.Add("@Year", SqlDbType.Float, 4, "Year")

insertComm.Parameters.Add("@ConLoss", SqlDbType.Float, 4, "Contract Loss")

insertComm.Parameters.Add("@CompLoss", SqlDbType.Float, 4, "Company Loss")

insertComm.Parameters.Add("@IndLossProp", SqlDbType.Float, 4, "IndInsured Loss Prop")

insertComm.Parameters.Add("@IndLossWC", SqlDbType.Float, 4, "IndInsured Loss WC")

insertComm.Parameters.Add("@eventsInfo", SqlDbType.NVarChar, 255, "Event Info")

da.InsertCommand = insertComm

Dim upComm As New SqlCommand("UPDATE [Test_DB_RMS].[dbo].[AIR_Ouput] " & _

"SET [Event] = @Event " & _

",[Year] = @Year " & _

",[Contract Loss] = @ConLoss " & _

",[Company Loss] = @CompLoss " & _

",[IndInsured Loss Prop] = @IndLossProp " & _

",[IndInsured Loss WC] = @IndLossWC " & _

",[Event Info] = @EventInfo", dbconn)

upComm.Parameters.Add("@Event", SqlDbType.Int, 4, "Event")

upComm.Parameters.Add("@Year", SqlDbType.Float, 4, "Year")

upComm.Parameters.Add("@ConLoss", SqlDbType.Float, 4, "Contract Loss")

upComm.Parameters.Add("@CompLoss", SqlDbType.Float, 4, "Company Loss")

upComm.Parameters.Add("@IndLossProp", SqlDbType.Float, 4, "IndInsured Loss Prop")

upComm.Parameters.Add("@IndLossWC", SqlDbType.Float, 4, "IndInsured Loss WC")

upComm.Parameters.Add("@EventsInfo", SqlDbType.NVarChar, 255, "Event Info")

da.UpdateCommand = upComm

da.Update(dsAIR, "TextDB")



************* ANY HELP WOULD BE GREATLY APPRECIATED************

THANKS

View 3 Replies View Related

Importing Data To An Existing Database Column From An .xsl File Or .cvs File

May 15, 2006

good morning,

 I want to load data that i receive everydays from my customers in .xls file format (excel) or cvs file format,  to the database that i have created on this purpose. but  when trying to do that whith SSIS; i got an error message .... that i can't import redudant data in my database column.

 

Best regards.

View 1 Replies View Related

Adding File Information To SQL Database On File Upload

Apr 18, 2004

Hi there :)

I'm in the final stage of my asp.net project and one of the last things I need to do is add the following file information to my SQL server 2000 database when a file is uploaded:

First of all I have a resource table to which I need to add:
- filename
- file_path
- file_size
(the resource_id has a auto increment value)

so that should hopefully be straight forward when the file is uploaded. The next step is to reference the new resource_id in my module_resource table. My module resource table consists of:
- resource_id (foreign key)
- module_id (foreign key)

So, adding the module_id is easy enough as I can just get the value using Request.QueryString["module_id"]. The bit that I am unsure about is how to insert the new resource_id from the resource table into the module_resource table on file upload. How is this done? Using one table would solve the issue but I want one resource to be available to all modules - many to many relationship.

Any ideas?

Many thanks :)

View 1 Replies View Related

SQL 2005 Mobile : The File Is Not A Valid Database File

Jun 8, 2006

I used SQl Server replication to create a new database (as I did using Visual Studio 2003) but when I go the Pocket PC and click on the file I get a native error 25011 with a description

The file is not a valid database file
An Internal error has occurred[,,,Databasename,,]
Interface defining error: IID_IDBInitialize

When I check on my Pocket PC what programs are available I've got Query Analyser 3.0 and SQLCE Query. It appears that the .sdf file is associated with SQLCE Query because when I use that to try and connect to the same database I get the same error.

If I use Query Analyser 3.0 (after having copied the .sdf file) to the temp directory I'm able to open the database.

There is a similar post to this one but it doesn't help me.

Is it that SQLCE Query is wrongly associated with the .sdf file?

If so how do I change that?

Or is there some other problem preventing me clicking on the .sdf db to open it?

I have recreated my project in Visual Studio 2005 and rebuilt all my components in 2005. There are some external ones that I use that I can't do this for.

The following is the build output that I get when I deploy to a clean PDA with a hard reset performed

------ Build started: Project: Printing, Configuration: Release Any CPU ------
No way to resolve conflict between "System.Data.SqlServerCe, Version=3.0.3600.0, Culture=neutral,

PublicKeyToken=3be235df1c8d2ad3, Retargetable=Yes" and "System.Data.SqlServerCe, Version=1.0.5000.0, Culture=neutral,

PublicKeyToken=969db8053d3322ac, Retargetable=Yes". Choosing "System.Data.SqlServerCe, Version=3.0.3600.0, Culture=neutral,

PublicKeyToken=3be235df1c8d2ad3, Retargetable=Yes" arbitrarily.
Printing -> C:DevmillarMobileSellercode2005MobileSellerMobileSellerPrintinginReleasePrinting.dll
------ Build started: Project: MobileSeller, Configuration: Release Any CPU ------
Consider app.config remapping of assembly "System.Data, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes"

from Version "1.0.5000.0" [] to Version "2.0.0.0" [C:Program FilesMicrosoft Visual Studio

8SmartDevicesSDKCompactFramework2.0v2.0WindowsCESystem.Data.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Windows.Forms, Culture=neutral, PublicKeyToken=969db8053d3322ac,

Retargetable=Yes" from Version "1.0.5000.0" [] to Version "2.0.0.0" [C:Program FilesMicrosoft Visual Studio

8SmartDevicesSDKCompactFramework2.0v2.0WindowsCESystem.Windows.Forms.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes" from

Version "1.0.5000.0" [] to Version "2.0.0.0" [C:Program FilesMicrosoft Visual Studio

8SmartDevicesSDKCompactFramework2.0v2.0WindowsCESystem.dll] to solve conflict and get rid of warning.
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Microsoft.Common.targets : warning MSB3247: Found conflicts between different

versions of the same dependent assembly.
MobileSeller -> C:DevmillarMobileSellercode2005MobileSellerMobileSellerMobileSellerinReleaseMobileSeller.exe
C:DevmillarMobileSellercode2005MobileSellerMobileSellerMobileSellerfrmInvoice.vb(546,9): warning VSD101: Members not

supported by the device platform should not be called: System.Windows.Forms.Panel.set_Text is not a supported method in this

platform.
C:DevmillarMobileSellercode2005MobileSellerMobileSellerMobileSellerfrmInvoice.vb(634,9): warning VSD101: Members not

supported by the device platform should not be called: System.Windows.Forms.Panel.set_Text is not a supported method in this

platform.
C:DevmillarMobileSellercode2005MobileSellerMobileSellerMobileSellerfrmInvoice.vb(706,9): warning VSD101: Members not

supported by the device platform should not be called: System.Windows.Forms.Panel.set_Text is not a supported method in this

platform.
C:DevmillarMobileSellercode2005MobileSellerMobileSellerMobileSellerfrmInvoice.vb(846,9): warning VSD101: Members not

supported by the device platform should not be called: System.Windows.Forms.Panel.set_Text is not a supported method in this

platform.
Done building project "MobileSeller.vbproj".
------ Skipped Deploy: Project: BO, Configuration: Release Any CPU ------
Project not selected to build for this solution configuration
------ Skipped Deploy: Project: Printing, Configuration: Release Any CPU ------
Project not selected to build for this solution configuration
------ Deploy started: Project: MobileSeller, Configuration: Release Any CPU ------
Deploying 'C:DevmillarMobileSellercode2005MobileSellerMobileSellerBOinReleaseInTheHand.Data.Adoce.dll'
Deploying 'C:DevmillarMobileSellercode2005MobileSellerMobileSellerBOinReleaseInTheHand.Interop.dll'
Deploying 'C:DevmillarMobileSellercode2005MobileSellerMobileSellerPrintinginReleasePocketHTMLprint_NetCF.dll'
Deploying 'C:DevMILLAR CODE CABINETVS2003CFReferencesUSICF.dll'
Deploying 'C:DevVS2005CFReferences
eleaseSignature.dll'
Deploying 'C:DevVS2005CFReferences
eleaseRealUpDown.dll'
Deploying 'C:DevmillarMobileSellercode2005MobileSellerMobileSellerPrintinginReleasePrinting.dll'
Deploying 'C:DevVS2005CFReferences
eleasePhoneAPI.dll'
Deploying 'C:DevVS2005CFReferences
eleaseMVnetApplication.dll'
Deploying 'C:DevVS2005CFReferences
eleaseMobileHList.dll'
Deploying 'C:DevVS2005CFReferences
eleaseMobileGrid.dll'
Deploying 'C:DevVS2005CFReferences
eleaseImageButtons.dll'
Deploying 'C:DevVS2005CFReferences
eleaseCreditCardValidator.dll'
Deploying 'C:DevmillarMobileSellercode2005MobileSellerMobileSellerBOinReleaseBO.dll'
Deploying 'C:DevmillarMobileSellercode2005MobileSellerMobileSellerMobileSellerinReleaseMobileSeller.exe'
========== Build: 3 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 2 skipped ==========

View 5 Replies View Related

SQL Server Management Studio Express (SSMSE)=&&>Object Explorer=&&>Databases Has C:SSMSE-BookChapter12WINCH12NORTHWND.MDF?

Feb 27, 2008

Hi all,

In my SQL Server Management Studio Express (SSMSE)=>Object Explorer=>Databases, the "NORTHWND" database was screwed up and is deleted completely. But under the same Object Explorer =>Databases, there is a database "C:SSMSE-BookChapter12WINCH12NORTHWND.MDF". I need to use this "NORTHWND" database in the SqlConnection. How can I specify the "Initial Catalog" (or "database") in the New SqlConnection code statement (in the ADO.NET 2.0-VB 2005 Express programming)?
Should it be like the following:

Dim sqlConnection As SqlConnection = New SqlConnction("Data Source=.SQLEXPRESS; Initial Catalog=C:SSMSE-BookChapter12WINCH12NORTHWND; Integrated Security=SSPI;") ? Or what is the right code statement for connecting to it?

Please help and advise.

Thanks in advance,
Scott Chang

View 7 Replies View Related

Remote Server Access Via SSMSE

Nov 24, 2007



In order to fix a web application bug the developer told me to to edit a stored procedure on my hosted SQL 2005 server. The hosting company's support say I should be able to do this using SQL Server Management Studio Express. I installed SSMSE, but it seems to want to only want to connect to a local server. Can I use this utility for remote DB management, or is there something else I need instead?

Thanks for your help.

-Michael

View 6 Replies View Related

Recovering Database From Transactional Log File(.ldf File)

Sep 23, 2007



Hi

I am in a trouble without doing any mistake. I restarted while in parallely my sql server was restarting i.e I opened a management studio.

When it booted up next time. I see that my database is gone. Though it is showed up in the server but has no node below it.
I then checked the mdf files and ldf files and found mdf file to be of 0 KB and ldf file is of 1.73 GB. My database was in full recovery mode but i did not take any database backup.

Here ais the entry from my SQL server log:

The operating system returned error 38(Reached the end of the file.) to SQL Server during a read at offset 0000000000000000 in file 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDATAHello.mdf'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
I wonder if now there is a case to recover my database..Can I restore/recover the database from .ldf file as it was in full recovery model?Any help i shighly appreciated.

View 5 Replies View Related

Does MS Access Installation Is Required For Running Application That Uses Access Mdb File

Nov 28, 2006

Hi,

I am developing an application that uses Access database (mdb file) to store the user data. The user of this application is not interested in the database file (to view in MS Access Environment). Does the user machine requires MS Access installation to run my application or just some couple of dlls (OleDB driver, Access DB Engine,..) should be enough to run my application?



Thanks,

Rao

View 3 Replies View Related

RESOLVED RESOLVED An Attempt To Attach An Auto-named Database For File &&<file String&&> Failed &&>&&>&&> But ONLY After SSE Reinstall

Sep 16, 2007

RESOLVED RESOLVED RESOLVED

DOH! When I rebuilt the OS, I changed the data partition ID's, and didn't remember to change them in the connetion strings

Not great, but better than continuing to bang head against wall.

Would like to say to MS appreciators that the VS2005 reinstall actually went quite well, considering.

===========================================================================





I built an app, works fine. Had the development environment working fine (VS2005 (SP0) and SQL Server Express). It had been stable for months, no problem.


Then I had to reinstall XP Pro...(finally threw too many conflicting programs into it, I guess...)


I managed to get VS2005 reinstalled ok. However, when I opened and compiled my existing app in VS2005, using Cassini, I got the dreaded error:

An attempt to attach an auto-named database for file <file string> failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

I also get this error for the compiled copy of the app on the same machine, running on IIS. (Where it also previously worked fine).


The Connection strings are all of the form

connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=(specific file string).MDF;Integrated Security=True;User Instance=True"


I appreciate that there are zillions of posts on this issue. I'm hoping that someone might know why this should happen in this particular case.


The thing that's different about this case is that the app was working fine; I have the app deployed on a demo machine and also on a remote server as well as on the development machine.


The only thing that changed is that there was this fresh install of SQL Server Express.


I tried using >> sp_configure user instances enabled','1';RECONFIGURE <<< in SSMSEE, which took, but didn't help.


So something is different in SSE. Since the app is stable everywhere else, I REALLY don't want to go through and adjust the connection strings...MUCH better to figure out what SSE needs to be happy with the existing connection strings...as it was before.

Any suggestions would be appreciated.

Thanks!

EDIT----TRIED SOME THINGS:




Changed folder and file permissions to allow ASPNET full access to the .mdf's and log files (though never had to do this before on the development machine.) No change...

Can see the table contents within the .mdf through SSMSE, and also through Server Explorer in VS2005.

So because the problem happens with both IIS and Cassini, I'm assuming it's got to be an issue between ASPNET and SSE.

EDIT --- TRIED SOME MORE THINGS:

I dimly remember that when I had this problem before, it was that the error message was too "dumb". It wasn't my file that had the permissions problems, it was that the SSE System Databases had to have permissions with respect to ASPNET.

I tried to set that up but I'm a complete newb on this area, so I don't know if I did it right. In SSMSE I created a Login for MyComputer/ASPNET, and gave it all permissions and roles, and then made it an owner for the four system databases...but no joy.

Any pointers on this last piece would be helpful.

EDIT - MORE INFO

The error details

[SqlException (0x80131904): An attempt to attach an auto-named database for file <filestring>.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1956
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +170
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +349
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181

View 1 Replies View Related

How To Get The Database File Into .bak File Format Using C#

Feb 20, 2007

Hi,
I want to retrive the values from the database 'northwind' and then i want to store the  backup files in "D:/Sample/north_database.bak" format(local machine).
I retrive the database values in .txt,XML format. Now i want to take in .bak format.
give the Suitable solution for this.
Subashini.G

View 4 Replies View Related

Seperation Of Log File And Database File

May 7, 2007

Hi,

I have the database file and log file for all the databases in SQL server in the same drive. I want to seperate both the log and data file into different drives. What is the best way to do it? Is there any script that could be run.

Please help.

Thanks !

View 2 Replies View Related

The SSE Provider Did Not Find The Database File Specified In The Connection String. At The Configured Trust Level (below High Trust Level), The SSE Provider Can Not Automatically Create The Database File.

Aug 31, 2007

The problem that I am having is that with Visual Web Developer I am creating a webpage and having it directly put online, so for example when I start a new ASP.NET page, I select the location to be HTTP, with the location http://MYWEBSERVER/Website   and for the language and Visual BasicI notice a couple of things, first that there is no longer a a link under the Main toolbar "Website" selection called the ASP.NET configuration.  So how can I configure what I want to have users be able to do?  It seems that this choice is only available if I am building the ASP.NET page on my "localhost".  So that is the first problem.  So I am able to get the pages to work, atleast the things such as the textboxes to show up etc, (Even things as advanced as the "Login" box).  How ever when I try to get someone to try to login  I am taken to a page that has an server error.  The error is:
"The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file. "
The Stack Trace Errors are at the bottom.  I think this is happening because the automatically generated databases are not getting built online as they are on my computer.  On my computer I have MSSQL express.  So either the databases are not getting built for some reason, (and I think that is the case as I don't see any in the folder).  So I think that somehow I have to create a database on my server, and then somehow configure the ASP.NET file, perhaps in the Web.Config file to look for that new database.  Is this the correct methodology?   Is there some simpler way that I can just somehow upload things as they are and have them work correctly on my server?   The error says that either the Server did not find the database or that the trust level was insufficient.  I don't think that is it as I just looked again and I don't see any .MDF files.  So how would I go about getting this to work right? Is there a way to do this with MySQL also?  So that I don't have to use MSSQL?  My server only allows 1 DataBase for that.
Thanks and I hope my question makes sense.  It is basically how can I get it to be able to create and check users etc. online?
Brian
[ProviderException: The SSE Provider did not find the database file specified in the connection string. At the configured trust level (below High trust level), the SSE provider can not automatically create the database file.]   System.Web.DataAccess.SqlConnectionHelper.EnsureSqlExpressDBFile(String connectionString) +2555237   System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +87   System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121   System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105   System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42   System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83   System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160   System.Web.UI.WebControls.Login.AttemptLogin() +105   System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
 

View 1 Replies View Related







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