Sunday, March 25, 2012
Cannot Re-attach SQL Server
the connection was broken. The database was unattached by the wizard,
and now when I try and reattach it I keep getting Error 5105 about the
path to the ndf file being incorrect. It is correct, I even pasted it
into Explorer but SQL just cannot find it. Any ideas?
Thanks.Hi
You do not say how you are attaching this, but try using sp_attach_db in
Query analyser if you are using Enterprise Manager to do this.
John
"cbsd.james" wrote:
> I was attempting to use the Copy Database Wizard, and halfway through
> the connection was broken. The database was unattached by the wizard,
> and now when I try and reattach it I keep getting Error 5105 about the
> path to the ndf file being incorrect. It is correct, I even pasted it
> into Explorer but SQL just cannot find it. Any ideas?
> Thanks.
>
Cannot Re-attach SQL Server
the connection was broken. The database was unattached by the wizard,
and now when I try and reattach it I keep getting Error 5105 about the
path to the ndf file being incorrect. It is correct, I even pasted it
into Explorer but SQL just cannot find it. Any ideas?
Thanks.Hi
You do not say how you are attaching this, but try using sp_attach_db in
Query analyser if you are using Enterprise Manager to do this.
John
"cbsd.james" wrote:
> I was attempting to use the Copy Database Wizard, and halfway through
> the connection was broken. The database was unattached by the wizard,
> and now when I try and reattach it I keep getting Error 5105 about the
> path to the ndf file being incorrect. It is correct, I even pasted it
> into Explorer but SQL just cannot find it. Any ideas?
> Thanks.
>sql
Cannot Pull table with RDA
I'm trying to set up a rda connection through the pocket pc emulator (standalone version 1.0) and my laptop which runs Windows Vista Home Premium. To start up the rda I first need to connect from my emulated device to my laptop which runs IIS 7.0 (complete installation with compatibility toward IIE 6.0). Connection to http://localhost from my laptop is working fine.
I start the emulator (Pocket Pc with Windows Professional) and cradle the emulated device.
Connection starts and I'm able to browse from my pc the content of the emulated device or to synchronize it.
Then I run Internet Explorer on the emulator and try to connect to http://mycomputername (correct) but I receive a message which says that it cannot connect to the page I was looking for because connection was lost.
Any suggestion on how to solve this issue?
Kind regards and many thanks in advance
Cristian
It seems that now I can connect to http://mycomputername and I'm able to browse the net with my pocket pc emulator.
Anyway when I'm attempting to connect to htpp://mycomputername/subfolder/sqlcesa30.dll (the path is correct, I receive the following error message: "The page cannot be displayed or downloaded because the connection was lost. Check the connection and try later"..which is the same message I've been receiving before)
What shall I do?
Hi,
it seems that I can connect to http://mycomputernae and http://mycomputername/virtualfolder/sqlcesa30.dll only if my laptop is connected to the local network or to the internet.
Does anybody know why?
Thankyou
|||Hi,
I'm using the following code to extablish a rda between my laptop and windows mobile classic 6 emulator to pull down a table named customers from a db named ristobar, having configure an account to access to the database which has db_owner permissions (user id=MobileUser, password=pippo)
Anyway I always get the following exception:
Source : Microsoft SQL server 2005 Everywhere Edition
Native Error: 28627
Message: Failure to open SQL Server with given connect string
HResult: 80004005
Below follows IIS 7.0 logfile.
The Ip address of my laptop is 192.168.0.199 and its name is SKYWALKER
What am I doing wrong?
Thank you
BEholder
Public Class Rdademo
Dim rdaOleDbConnectionString As String = "Provider=SQLOLEDB;Data Source=\SKYWALKER;Initial_ Catalog=ristobar;User ID=MobileUser;Password=pippo;"
Dim rdaUrl As String = "http://192.168.0.199/ristobardb/sqlcesa30.dll" ' The ip is correct
Dim localConnection As String = "Data Source=\My Documents\Rdadb.sdf"
Private Sub RdaPull()
Try
If System.IO.File.Exists("\My Documents\Rdadb.sdf") Then System.IO.File.Delete("\My_ Documents\Rdadb.sdf")
Dim engine As New SqlCeEngine
engine.LocalConnectionString = localConnection
engine.CreateDatabase()
engine.Dispose()
Dim rda As SqlCeRemoteDataAccess = Nothing
rda = New SqlCeRemoteDataAccess(rdaUrl, localConnection)
rda.InternetUrl = rdaUrl
rda.LocalConnectionString = localConnection
rda.Pull("customers", "select * from customers", rdaOleDbConnectionString, RdaTrackOption.TrackingOnWithIndexes, "Error Table")
rda.Dispose()
MessageBox.Show("Done!")
Catch ex As System.Data.SqlServerCe.SqlCeException
MessageBox.Show(ex.Source)
MessageBox.Show(ex.NativeError)
MessageBox.Show(ex.Message)
MessageBox.Show(Hex(ex.HResult))
End Try
End Sub
IIS 7.0 Log:
Software: Microsoft Internet Information Services 7.0
#Version: 1.0
#Date: 2007-08-29 14:28:54
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status
2007-08-29 15:21:33 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:35 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:38 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:40 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:43 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:47 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:49 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0|||
Change your OLEDB connectionstring:
Dim rdaOleDbConnectionString As String = "Provider=SQLOLEDB;Data Source=SKYWALKER;Initial_ Catalog=ristobar;User ID=MobileUser;Password=pippo;"
or
Dim rdaOleDbConnectionString As String = "Provider=SQLOLEDB;Data Source=192.168.0.199;Initial_ Catalog=ristobar;User ID=MobileUser;Password=pippo;"|||
Thanks for your reply Erik,
unfortunately it didn't work.
I tried both using Data Source=SKYWALKER and using Data Source=192.168.0.199 but I am receiving the same error.
Shall I use a particular port to connect to the SQL server?
By the way....reading other posts I noticed a couple of things: 1) shall I indicate the full path of the SQL server ? That is, if SQL Server Express is running on my machine (default name SQLEXPRESS): 192.168.0.199\SQLEXPRESS,1433 ? Port 1433 should be opened, is that right?
2) Shall I specify TCP/IP connection inside the connection string even if I am using a pocket pc emulator configured to use DMA access or it is not necessary?
Thank you for your help
Cristian
|||You did not mentions SQL Server Express... Yes, a connection string with IP address and \SQLEXPRESS,1433 is required and port 1433 must be open for connections.
It is not required to specify TCP/IP connection in the connectionstrin when cradled via DMA.
|||OK, it seems that somehow things are beginning to work, infact I am getting a new error message.First of all I must say that now I am able to connect to SQL Server Express through SQL Server Management Studio Express using MobileUser as user id and pippo as password.
I run the same code that i posted before, changed the connection string to
"Provider=sqloledb;Data Source=localhost\SQLEXPRESS;User ID=MobileUser;Password=pippo;Initial Catalog=ristobar;"
and I get the following error:
Number: 29022
Description:The version of the Microsoft OLE DB Provider for SQL Server is not correct. Install MDAC 2.8 or later.
HResult: 0x80004005
What do I have to install now?
Thanks for your kind help
Cristian
|||OK, now we are getting closer
You need to install the latest version of the SQL Compact Server Tools, build 5300. See this post:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1368182&SiteID=1 for installtion tips
(install the msi from an elevated command prompt!)
The latest version of the tools can be downloaded from http://www.microsoft.com/downloads/details.aspx?FamilyID=4e45f676-e69a-4f7f-a016-c1585acf4310&displaylang=en
After installation, the sqlcesa30.dll file should be build version 5300.
Also see this KB article, under the heading: Known issues for SQL Server Compact Edition 3.1 on Windows Vista
http://support.microsoft.com/?kbid=920700
|||Thanks again for your help.
I will try to install SQL Compact Server Tools at the link you specified from the command prompt (and will look to known issues on Vista)
Anyway I was pretty sure to have already installed that build...perhaps not in the right way.
If I am getting the same error after the installation sould I install MRDAC 2.8 or MRDAC 2.8 SP1 to solve this issue?
Cristian
|||MDAC is not supported on Vista, so no.|||So we must succeed|||...done!
Now rda.pull is working properly: the table is downloaded correctly into the file ristobar.sdf.
As I can see on Query Analyzer all records are there.
Anyway I still got an issue regarding rda.dispose() : it crashes the emulator.
The pull command is executed as below:
rda.Pull("customers", "select * from customers", rdaOleDbConnectionString, RdaTrackOption.TrackingOff)
MessageBox.Show ("Done!")
breakpoint rda.dispose ()
If I remove the breakpoint or the corresponding line of program the emulator won't crash, otherwise It will got stuck and will have to be shut down.
What should it depend on? A misconfigured time-out on SQL Server Express or on IIS ?
Thank you!
Cristian
|||Try to catch any exceptions as per the pattern in this: http://msdn2.microsoft.com/en-us/library/swwy8y74.aspx
To get all the error information look at this sample: http://msdn2.microsoft.com/en-us/library/ms174079.aspx
|||Well, having read your suggestion I changed my code a little.I'm executing the following subroutine to manage the rda.pull and to catch possible exceptions. Unfortunately the emulator still get stuck where highlighted.
Thanks
Cristian
Private Sub RdaPull()
Dim rdaOleDbConnectionString As String = "Provider=sqloledb;Data Source=localhost\SQLEXPRESS;User ID=MobileUser;Password=pippo;Initial Catalog=ristobar;Persist Security Info=True;"
Dim rdaUrl As String = "http://192.168.0.199/ristobardb2/sqlcesa30.dll"
Dim localConnection As String = "Data Source=\My Documents\Rdadb.sdf"
Dim rda As SqlCeRemoteDataAccess = Nothing
Try
If System.IO.File.Exists("\My Documents\Rdadb.sdf") Then System.IO.File.Delete("\My Documents\Rdadb.sdf")
Dim engine As New SqlCeEngine
engine.LocalConnectionString = localConnection
engine.CreateDatabase()
engine.Dispose()
rda = New SqlCeRemoteDataAccess(rdaUrl, localConnection)
rda.InternetUrl = rdaUrl
rda.LocalConnectionString = localConnection
rda.Pull("customers", "select * from customers", rdaOleDbConnectionString, RdaTrackOption.TrackingOff)
MessageBox.Show("Done!")
Catch ex As System.Data.SqlServerCe.SqlCeException
MessageBox.Show(ex.Source)
MessageBox.Show(ex.NativeError)
MessageBox.Show(ex.Message)
MessageBox.Show(Hex(ex.HResult))
Finally
rda.Dispose()
End Try|||
Is the sub that I posted well formed?
Cannot Pull table with RDA
I'm trying to set up a rda connection through the pocket pc emulator (standalone version 1.0) and my laptop which runs Windows Vista Home Premium. To start up the rda I first need to connect from my emulated device to my laptop which runs IIS 7.0 (complete installation with compatibility toward IIE 6.0). Connection to http://localhost from my laptop is working fine.
I start the emulator (Pocket Pc with Windows Professional) and cradle the emulated device.
Connection starts and I'm able to browse from my pc the content of the emulated device or to synchronize it.
Then I run Internet Explorer on the emulator and try to connect to http://mycomputername (correct) but I receive a message which says that it cannot connect to the page I was looking for because connection was lost.
Any suggestion on how to solve this issue?
Kind regards and many thanks in advance
Cristian
It seems that now I can connect to http://mycomputername and I'm able to browse the net with my pocket pc emulator.
Anyway when I'm attempting to connect to htpp://mycomputername/subfolder/sqlcesa30.dll (the path is correct, I receive the following error message: "The page cannot be displayed or downloaded because the connection was lost. Check the connection and try later"..which is the same message I've been receiving before)
What shall I do?
Hi,
it seems that I can connect to http://mycomputernae and http://mycomputername/virtualfolder/sqlcesa30.dll only if my laptop is connected to the local network or to the internet.
Does anybody know why?
Thankyou
|||Hi,
I'm using the following code to extablish a rda between my laptop and windows mobile classic 6 emulator to pull down a table named customers from a db named ristobar, having configure an account to access to the database which has db_owner permissions (user id=MobileUser, password=pippo)
Anyway I always get the following exception:
Source : Microsoft SQL server 2005 Everywhere Edition
Native Error: 28627
Message: Failure to open SQL Server with given connect string
HResult: 80004005
Below follows IIS 7.0 logfile.
The Ip address of my laptop is 192.168.0.199 and its name is SKYWALKER
What am I doing wrong?
Thank you
BEholder
Public Class Rdademo
Dim rdaOleDbConnectionString As String = "Provider=SQLOLEDB;Data Source=\SKYWALKER;Initial_ Catalog=ristobar;User ID=MobileUser;Password=pippo;"
Dim rdaUrl As String = "http://192.168.0.199/ristobardb/sqlcesa30.dll" ' The ip is correct
Dim localConnection As String = "Data Source=\My Documents\Rdadb.sdf"
Private Sub RdaPull()
Try
If System.IO.File.Exists("\My Documents\Rdadb.sdf") Then System.IO.File.Delete("\My_ Documents\Rdadb.sdf")
Dim engine As New SqlCeEngine
engine.LocalConnectionString = localConnection
engine.CreateDatabase()
engine.Dispose()
Dim rda As SqlCeRemoteDataAccess = Nothing
rda = New SqlCeRemoteDataAccess(rdaUrl, localConnection)
rda.InternetUrl = rdaUrl
rda.LocalConnectionString = localConnection
rda.Pull("customers", "select * from customers", rdaOleDbConnectionString, RdaTrackOption.TrackingOnWithIndexes, "Error Table")
rda.Dispose()
MessageBox.Show("Done!")
Catch ex As System.Data.SqlServerCe.SqlCeException
MessageBox.Show(ex.Source)
MessageBox.Show(ex.NativeError)
MessageBox.Show(ex.Message)
MessageBox.Show(Hex(ex.HResult))
End Try
End Sub
IIS 7.0 Log:
Software: Microsoft Internet Information Services 7.0
#Version: 1.0
#Date: 2007-08-29 14:28:54
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status
2007-08-29 15:21:33 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:35 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:38 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:40 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:43 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:47 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:49 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0|||
Change your OLEDB connectionstring:
Dim rdaOleDbConnectionString As String = "Provider=SQLOLEDB;Data Source=SKYWALKER;Initial_ Catalog=ristobar;User ID=MobileUser;Password=pippo;"
or
Dim rdaOleDbConnectionString As String = "Provider=SQLOLEDB;Data Source=192.168.0.199;Initial_ Catalog=ristobar;User ID=MobileUser;Password=pippo;"|||
Thanks for your reply Erik,
unfortunately it didn't work.
I tried both using Data Source=SKYWALKER and using Data Source=192.168.0.199 but I am receiving the same error.
Shall I use a particular port to connect to the SQL server?
By the way....reading other posts I noticed a couple of things: 1) shall I indicate the full path of the SQL server ? That is, if SQL Server Express is running on my machine (default name SQLEXPRESS): 192.168.0.199\SQLEXPRESS,1433 ? Port 1433 should be opened, is that right?
2) Shall I specify TCP/IP connection inside the connection string even if I am using a pocket pc emulator configured to use DMA access or it is not necessary?
Thank you for your help
Cristian
|||You did not mentions SQL Server Express... Yes, a connection string with IP address and \SQLEXPRESS,1433 is required and port 1433 must be open for connections.
It is not required to specify TCP/IP connection in the connectionstrin when cradled via DMA.
|||OK, it seems that somehow things are beginning to work, infact I am getting a new error message.First of all I must say that now I am able to connect to SQL Server Express through SQL Server Management Studio Express using MobileUser as user id and pippo as password.
I run the same code that i posted before, changed the connection string to
"Provider=sqloledb;Data Source=localhost\SQLEXPRESS;User ID=MobileUser;Password=pippo;Initial Catalog=ristobar;"
and I get the following error:
Number: 29022
Description:The version of the Microsoft OLE DB Provider for SQL Server is not correct. Install MDAC 2.8 or later.
HResult: 0x80004005
What do I have to install now?
Thanks for your kind help
Cristian
|||OK, now we are getting closer
You need to install the latest version of the SQL Compact Server Tools, build 5300. See this post:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1368182&SiteID=1 for installtion tips
(install the msi from an elevated command prompt!)
The latest version of the tools can be downloaded from http://www.microsoft.com/downloads/details.aspx?FamilyID=4e45f676-e69a-4f7f-a016-c1585acf4310&displaylang=en
After installation, the sqlcesa30.dll file should be build version 5300.
Also see this KB article, under the heading: Known issues for SQL Server Compact Edition 3.1 on Windows Vista
http://support.microsoft.com/?kbid=920700
|||Thanks again for your help.
I will try to install SQL Compact Server Tools at the link you specified from the command prompt (and will look to known issues on Vista)
Anyway I was pretty sure to have already installed that build...perhaps not in the right way.
If I am getting the same error after the installation sould I install MRDAC 2.8 or MRDAC 2.8 SP1 to solve this issue?
Cristian
|||MDAC is not supported on Vista, so no.|||So we must succeed|||...done!
Now rda.pull is working properly: the table is downloaded correctly into the file ristobar.sdf.
As I can see on Query Analyzer all records are there.
Anyway I still got an issue regarding rda.dispose() : it crashes the emulator.
The pull command is executed as below:
rda.Pull("customers", "select * from customers", rdaOleDbConnectionString, RdaTrackOption.TrackingOff)
MessageBox.Show ("Done!")
breakpoint rda.dispose ()
If I remove the breakpoint or the corresponding line of program the emulator won't crash, otherwise It will got stuck and will have to be shut down.
What should it depend on? A misconfigured time-out on SQL Server Express or on IIS ?
Thank you!
Cristian
|||Try to catch any exceptions as per the pattern in this: http://msdn2.microsoft.com/en-us/library/swwy8y74.aspx
To get all the error information look at this sample: http://msdn2.microsoft.com/en-us/library/ms174079.aspx
|||Well, having read your suggestion I changed my code a little.I'm executing the following subroutine to manage the rda.pull and to catch possible exceptions. Unfortunately the emulator still get stuck where highlighted.
Thanks
Cristian
Private Sub RdaPull()
Dim rdaOleDbConnectionString As String = "Provider=sqloledb;Data Source=localhost\SQLEXPRESS;User ID=MobileUser;Password=pippo;Initial Catalog=ristobar;Persist Security Info=True;"
Dim rdaUrl As String = "http://192.168.0.199/ristobardb2/sqlcesa30.dll"
Dim localConnection As String = "Data Source=\My Documents\Rdadb.sdf"
Dim rda As SqlCeRemoteDataAccess = Nothing
Try
If System.IO.File.Exists("\My Documents\Rdadb.sdf") Then System.IO.File.Delete("\My Documents\Rdadb.sdf")
Dim engine As New SqlCeEngine
engine.LocalConnectionString = localConnection
engine.CreateDatabase()
engine.Dispose()
rda = New SqlCeRemoteDataAccess(rdaUrl, localConnection)
rda.InternetUrl = rdaUrl
rda.LocalConnectionString = localConnection
rda.Pull("customers", "select * from customers", rdaOleDbConnectionString, RdaTrackOption.TrackingOff)
MessageBox.Show("Done!")
Catch ex As System.Data.SqlServerCe.SqlCeException
MessageBox.Show(ex.Source)
MessageBox.Show(ex.NativeError)
MessageBox.Show(ex.Message)
MessageBox.Show(Hex(ex.HResult))
Finally
rda.Dispose()
End Try|||
Is the sub that I posted well formed?
Cannot Pull table with RDA
I'm trying to set up a rda connection through the pocket pc emulator (standalone version 1.0) and my laptop which runs Windows Vista Home Premium. To start up the rda I first need to connect from my emulated device to my laptop which runs IIS 7.0 (complete installation with compatibility toward IIE 6.0). Connection to http://localhost from my laptop is working fine.
I start the emulator (Pocket Pc with Windows Professional) and cradle the emulated device.
Connection starts and I'm able to browse from my pc the content of the emulated device or to synchronize it.
Then I run Internet Explorer on the emulator and try to connect to http://mycomputername (correct) but I receive a message which says that it cannot connect to the page I was looking for because connection was lost.
Any suggestion on how to solve this issue?
Kind regards and many thanks in advance
Cristian
It seems that now I can connect to http://mycomputername and I'm able to browse the net with my pocket pc emulator.
Anyway when I'm attempting to connect to htpp://mycomputername/subfolder/sqlcesa30.dll (the path is correct, I receive the following error message: "The page cannot be displayed or downloaded because the connection was lost. Check the connection and try later"..which is the same message I've been receiving before)
What shall I do?
Hi,
it seems that I can connect to http://mycomputernae and http://mycomputername/virtualfolder/sqlcesa30.dll only if my laptop is connected to the local network or to the internet.
Does anybody know why?
Thankyou
|||Hi,
I'm using the following code to extablish a rda between my laptop and windows mobile classic 6 emulator to pull down a table named customers from a db named ristobar, having configure an account to access to the database which has db_owner permissions (user id=MobileUser, password=pippo)
Anyway I always get the following exception:
Source : Microsoft SQL server 2005 Everywhere Edition
Native Error: 28627
Message: Failure to open SQL Server with given connect string
HResult: 80004005
Below follows IIS 7.0 logfile.
The Ip address of my laptop is 192.168.0.199 and its name is SKYWALKER
What am I doing wrong?
Thank you
BEholder
Public Class Rdademo
Dim rdaOleDbConnectionString As String = "Provider=SQLOLEDB;Data Source=\SKYWALKER;Initial_ Catalog=ristobar;User ID=MobileUser;Password=pippo;"
Dim rdaUrl As String = "http://192.168.0.199/ristobardb/sqlcesa30.dll" ' The ip is correct
Dim localConnection As String = "Data Source=\My Documents\Rdadb.sdf"
Private Sub RdaPull()
Try
If System.IO.File.Exists("\My Documents\Rdadb.sdf") Then System.IO.File.Delete("\My_ Documents\Rdadb.sdf")
Dim engine As New SqlCeEngine
engine.LocalConnectionString = localConnection
engine.CreateDatabase()
engine.Dispose()
Dim rda As SqlCeRemoteDataAccess = Nothing
rda = New SqlCeRemoteDataAccess(rdaUrl, localConnection)
rda.InternetUrl = rdaUrl
rda.LocalConnectionString = localConnection
rda.Pull("customers", "select * from customers", rdaOleDbConnectionString, RdaTrackOption.TrackingOnWithIndexes, "Error Table")
rda.Dispose()
MessageBox.Show("Done!")
Catch ex As System.Data.SqlServerCe.SqlCeException
MessageBox.Show(ex.Source)
MessageBox.Show(ex.NativeError)
MessageBox.Show(ex.Message)
MessageBox.Show(Hex(ex.HResult))
End Try
End Sub
IIS 7.0 Log:
Software: Microsoft Internet Information Services 7.0
#Version: 1.0
#Date: 2007-08-29 14:28:54
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status
2007-08-29 15:21:33 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:35 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:38 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:40 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:43 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:47 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0
2007-08-29 15:21:49 127.0.0.1 POST /ristobardb/sqlcesa30.dll - 80 - 127.0.0.1 SQLCEReplicationClient 200 0 0|||
Change your OLEDB connectionstring:
Dim rdaOleDbConnectionString As String = "Provider=SQLOLEDB;Data Source=SKYWALKER;Initial_ Catalog=ristobar;User ID=MobileUser;Password=pippo;"
or
Dim rdaOleDbConnectionString As String = "Provider=SQLOLEDB;Data Source=192.168.0.199;Initial_ Catalog=ristobar;User ID=MobileUser;Password=pippo;"|||
Thanks for your reply Erik,
unfortunately it didn't work.
I tried both using Data Source=SKYWALKER and using Data Source=192.168.0.199 but I am receiving the same error.
Shall I use a particular port to connect to the SQL server?
By the way....reading other posts I noticed a couple of things: 1) shall I indicate the full path of the SQL server ? That is, if SQL Server Express is running on my machine (default name SQLEXPRESS): 192.168.0.199\SQLEXPRESS,1433 ? Port 1433 should be opened, is that right?
2) Shall I specify TCP/IP connection inside the connection string even if I am using a pocket pc emulator configured to use DMA access or it is not necessary?
Thank you for your help
Cristian
|||You did not mentions SQL Server Express... Yes, a connection string with IP address and \SQLEXPRESS,1433 is required and port 1433 must be open for connections.
It is not required to specify TCP/IP connection in the connectionstrin when cradled via DMA.
|||OK, it seems that somehow things are beginning to work, infact I am getting a new error message.First of all I must say that now I am able to connect to SQL Server Express through SQL Server Management Studio Express using MobileUser as user id and pippo as password.
I run the same code that i posted before, changed the connection string to
"Provider=sqloledb;Data Source=localhost\SQLEXPRESS;User ID=MobileUser;Password=pippo;Initial Catalog=ristobar;"
and I get the following error:
Number: 29022
Description:The version of the Microsoft OLE DB Provider for SQL Server is not correct. Install MDAC 2.8 or later.
HResult: 0x80004005
What do I have to install now?
Thanks for your kind help
Cristian
|||OK, now we are getting closer
You need to install the latest version of the SQL Compact Server Tools, build 5300. See this post:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1368182&SiteID=1 for installtion tips
(install the msi from an elevated command prompt!)
The latest version of the tools can be downloaded from http://www.microsoft.com/downloads/details.aspx?FamilyID=4e45f676-e69a-4f7f-a016-c1585acf4310&displaylang=en
After installation, the sqlcesa30.dll file should be build version 5300.
Also see this KB article, under the heading: Known issues for SQL Server Compact Edition 3.1 on Windows Vista
http://support.microsoft.com/?kbid=920700
|||Thanks again for your help.
I will try to install SQL Compact Server Tools at the link you specified from the command prompt (and will look to known issues on Vista)
Anyway I was pretty sure to have already installed that build...perhaps not in the right way.
If I am getting the same error after the installation sould I install MRDAC 2.8 or MRDAC 2.8 SP1 to solve this issue?
Cristian
|||MDAC is not supported on Vista, so no.|||So we must succeed|||...done!
Now rda.pull is working properly: the table is downloaded correctly into the file ristobar.sdf.
As I can see on Query Analyzer all records are there.
Anyway I still got an issue regarding rda.dispose() : it crashes the emulator.
The pull command is executed as below:
rda.Pull("customers", "select * from customers", rdaOleDbConnectionString, RdaTrackOption.TrackingOff)
MessageBox.Show ("Done!")
breakpoint rda.dispose ()
If I remove the breakpoint or the corresponding line of program the emulator won't crash, otherwise It will got stuck and will have to be shut down.
What should it depend on? A misconfigured time-out on SQL Server Express or on IIS ?
Thank you!
Cristian
|||Try to catch any exceptions as per the pattern in this: http://msdn2.microsoft.com/en-us/library/swwy8y74.aspx
To get all the error information look at this sample: http://msdn2.microsoft.com/en-us/library/ms174079.aspx
|||Well, having read your suggestion I changed my code a little.I'm executing the following subroutine to manage the rda.pull and to catch possible exceptions. Unfortunately the emulator still get stuck where highlighted.
Thanks
Cristian
Private Sub RdaPull()
Dim rdaOleDbConnectionString As String = "Provider=sqloledb;Data Source=localhost\SQLEXPRESS;User ID=MobileUser;Password=pippo;Initial Catalog=ristobar;Persist Security Info=True;"
Dim rdaUrl As String = "http://192.168.0.199/ristobardb2/sqlcesa30.dll"
Dim localConnection As String = "Data Source=\My Documents\Rdadb.sdf"
Dim rda As SqlCeRemoteDataAccess = Nothing
Try
If System.IO.File.Exists("\My Documents\Rdadb.sdf") Then System.IO.File.Delete("\My Documents\Rdadb.sdf")
Dim engine As New SqlCeEngine
engine.LocalConnectionString = localConnection
engine.CreateDatabase()
engine.Dispose()
rda = New SqlCeRemoteDataAccess(rdaUrl, localConnection)
rda.InternetUrl = rdaUrl
rda.LocalConnectionString = localConnection
rda.Pull("customers", "select * from customers", rdaOleDbConnectionString, RdaTrackOption.TrackingOff)
MessageBox.Show("Done!")
Catch ex As System.Data.SqlServerCe.SqlCeException
MessageBox.Show(ex.Source)
MessageBox.Show(ex.NativeError)
MessageBox.Show(ex.Message)
MessageBox.Show(Hex(ex.HResult))
Finally
rda.Dispose()
End Try|||
Is the sub that I posted well formed?
sqlThursday, March 22, 2012
Cannot open user default database. Login failed.
Hi,
I got this application system having SQLExpress as database (ABCSystem.mdf). I'm connecting to the database thru connection string specifying database path in App.config.
At the same time, I got two paths for the mdf files. The first one is the path for my database project while the second one is the path to conduct testing. (This means that I got identical ABCSystem.mdf in two paths)
1) C:\Program Files\Company ABC\ABCDatabaseProject\
2) C:\Program Files\Company ABC Limited\ABCSystem\Database\
In my development machine, I can run my application where database path is testing path (number 2).
When I tried to copy the ABCSystem.mdf and ABCSystem_log.LDF and my application program files to another PC to test, I got the subject error message. (note that I copy program files under directory "C:\Program Files\Company ABC Limited\ABCSystem\" and mdf files under "C:\Program Files\Company ABC Limited\ABCSystem\Database\")
I try to edit path from database testing path to database project path in app.config, run the application, and notice that it is running OK.
What seems to cause the problem? Coz I need the database in the testing path which is "C:\Program Files\Company ABC Limited\ABCSystem\Database\" AND NOT "C:\Program Files\Company ABC\ABCDatabaseProject\".
Thanks alot for your kind attention.
Try this first, and then check your string accordingly:
http://msdn2.microsoft.com/en-us/library/ms345332.aspx
Buck Woody
|||I'm having this identical issue with an ODBC connection.After wasting hours, I realized I only get the error when I try to change database name. (e.g. from a development to a production server). Based upon everything I've tried, I determined you CANNOT change server name in a Crystal report programmatically as in the Crystal sample code. It may be a possible to change servers if using a command based report (explicit SQL query), but our reports all use tables so a trial would be irrelevant.
Cannot open user default database. Login failed.
Hi,
I got this application system having SQLExpress as database (ABCSystem.mdf). I'm connecting to the database thru connection string specifying database path in App.config.
At the same time, I got two paths for the mdf files. The first one is the path for my database project while the second one is the path to conduct testing. (This means that I got identical ABCSystem.mdf in two paths)
1) C:\Program Files\Company ABC\ABCDatabaseProject\
2) C:\Program Files\Company ABC Limited\ABCSystem\Database\
In my development machine, I can run my application where database path is testing path (number 2).
When I tried to copy the ABCSystem.mdf and ABCSystem_log.LDF and my application program files to another PC to test, I got the subject error message. (note that I copy program files under directory "C:\Program Files\Company ABC Limited\ABCSystem\" and mdf files under "C:\Program Files\Company ABC Limited\ABCSystem\Database\")
I try to edit path from database testing path to database project path in app.config, run the application, and notice that it is running OK.
What seems to cause the problem? Coz I need the database in the testing path which is "C:\Program Files\Company ABC Limited\ABCSystem\Database\" AND NOT "C:\Program Files\Company ABC\ABCDatabaseProject\".
Thanks alot for your kind attention.
Try this first, and then check your string accordingly:
http://msdn2.microsoft.com/en-us/library/ms345332.aspx
Buck Woody
|||I'm having this identical issue with an ODBC connection.After wasting hours, I realized I only get the error when I try to change database name. (e.g. from a development to a production server). Based upon everything I've tried, I determined you CANNOT change server name in a Crystal report programmatically as in the Crystal sample code. It may be a possible to change servers if using a command based report (explicit SQL query), but our reports all use tables so a trial would be irrelevant.
Cannot open the local NT group in the SQL Server Group
I logged in as administrator, and tried to open the local
NT SQL Server and the message appears:
"A connection could not be established to (local).
Reason: SQL Server does not exist or access denied.
ConnectionOpen(Connect()).
Please verify SQL Server is running and check your SQL
Server Registration properties (by right-clicking on the
(local node) and try again."
I cannot access the registration properties.
I also checked event viewer and found the following error
message:
"There are multiple accounts with name
MSSQLSvc/mpserver01.martinousproduce.local:1433 of type
10. "
Any ideas on the problem? I restarted the SQL Server but
still unable to connect.
Thanks,
JoeDo you have more than 1 instance of SQL server installed?
Perhaps they are both trying to use the same IP port
number of 1433. Go to your NT services and see how many
instance you have of SQL. Try and start and connect to one
of them and then see if you have a clash of IP port
numbers.
If that isn't the case check that the SQL service is
running (by going to your NT services). Then, check
your "server network utility" from the program menu and if
TCP/IP is there take it out and put in named pipes. If
TCP/IP isn't there, then put it in. Remember you could
affect how people connect to the SQL server (i.e. is it in
production?) so take care when making your changes and
write them down so you don't forget how to undo them.
Hope this helps.
-J
p.s. just one more thought...do you have a name conflict
on the network? If so, it is possible that this SQL
server's IP stack did not initialize and therefore the SQL
services won't start.
>--Original Message--
>Hello,
>I logged in as administrator, and tried to open the local
>NT SQL Server and the message appears:
>"A connection could not be established to (local).
>Reason: SQL Server does not exist or access denied.
>ConnectionOpen(Connect()).
>Please verify SQL Server is running and check your SQL
>Server Registration properties (by right-clicking on the
>(local node) and try again."
>I cannot access the registration properties.
>I also checked event viewer and found the following error
>message:
>"There are multiple accounts with name
>MSSQLSvc/mpserver01.martinousproduce.local:1433 of type
>10. "
>Any ideas on the problem? I restarted the SQL Server but
>still unable to connect.
>Thanks,
>Joe
>.
>
Tuesday, March 20, 2012
Cannot open database requested by the login.
MS SQL Server
i have this connection string...
Data Source=.\SQLEXPRESS;Initial Catalog=dbName;Integrated Security=SSPI;
but an error appears on my conn.Open();
Cannot open database "dbName" requested by the login. The login failed.
Login failed for user 'SERVER\yshie'.
yshie is my username in the computer i use. just to clarify, there are two
user accounts in my pc but both of them are administrators.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server-connectivity/200703/1
ok.. i'll start from a scratch! kindly help me build my connection string!
pls don't refer me to different websites because i can't understand those
terms(user instance... etc) so its useless for me. all i know is that i have
this visual studio 2005 and isn't it that inside there is ms sql server where
i created my database. what connection string will i use?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server-connectivity/200703/1
|||One of the problems with the approach of "just tell me what
string to use and I don't understand the terms so don't go
into that" is that the problems you are having with the
connection string is from not understanding what those parts
of the string mean. It's like creating classes without
wanting to know what properties or methods are.
You said you are using this string:
Data Source=.\SQLEXPRESS;Initial Catalog=dbName;Integrated
Security=SSPI;
And that you get the error:
Cannot open database "dbName" requested by the login. The
login failed.
Login failed for user 'SERVER\yshie'.
The problem is that the login user (you) do not have access
to the database dbName or the database dbName does not exist
on the server. If the database you are using in your string
really is dbName then that database must exist on the server
and you must have access to it.
Just as a connection test, trying changing your Initial
Catalog to master. Keep the data source as: .\SQLEXPRESS
And keep the Integrated Security set to SSPI
-Sue
On Fri, 30 Mar 2007 04:25:14 GMT, "yshie via droptable.com"
<u32884@.uwe> wrote:
>ok.. i'll start from a scratch! kindly help me build my connection string!
>pls don't refer me to different websites because i can't understand those
>terms(user instance... etc) so its useless for me. all i know is that i have
>this visual studio 2005 and isn't it that inside there is ms sql server where
>i created my database. what connection string will i use?
Cannot open database requested by the login.
MS SQL Server
i have this connection string...
Data Source=.\SQLEXPRESS;Initial Catalog=dbName;Integrated Security=SSPI;
but an error appears on my conn.Open();
Cannot open database "dbName" requested by the login. The login failed.
Login failed for user 'SERVER\yshie'.
yshie is my username in the computer i use. just to clarify, there are two
user accounts in my pc but both of them are administrators.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...tivity/200703/1ok.. i'll start from a scratch! kindly help me build my connection string!
pls don't refer me to different websites because i can't understand those
terms(user instance... etc) so its useless for me. all i know is that i have
this visual studio 2005 and isn't it that inside there is ms sql server wher
e
i created my database. what connection string will i use?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...tivity/200703/1|||One of the problems with the approach of "just tell me what
string to use and I don't understand the terms so don't go
into that" is that the problems you are having with the
connection string is from not understanding what those parts
of the string mean. It's like creating classes without
wanting to know what properties or methods are.
You said you are using this string:
Data Source=.\SQLEXPRESS;Initial Catalog=dbName;Integrated
Security=SSPI;
And that you get the error:
Cannot open database "dbName" requested by the login. The
login failed.
Login failed for user 'SERVER\yshie'.
The problem is that the login user (you) do not have access
to the database dbName or the database dbName does not exist
on the server. If the database you are using in your string
really is dbName then that database must exist on the server
and you must have access to it.
Just as a connection test, trying changing your Initial
Catalog to master. Keep the data source as: .\SQLEXPRESS
And keep the Integrated Security set to SSPI
-Sue
On Fri, 30 Mar 2007 04:25:14 GMT, "yshie via droptable.com"
<u32884@.uwe> wrote:
>ok.. i'll start from a scratch! kindly help me build my connection string!
>pls don't refer me to different websites because i can't understand those
>terms(user instance... etc) so its useless for me. all i know is that i hav
e
>this visual studio 2005 and isn't it that inside there is ms sql server whe
re
>i created my database. what connection string will i use?
Cannot Open Database after Publishing
I have developed a database application using c# and SQL Express 2005.
I have coded a connection string that works fine on the development machine but upon publishing to another machine I am getting the following error message:
Cannot open database "name of database" requested by the login. The login failed. Login Failed for user "machine name\user name".
The remote machine has SQL server express installed.
Now on the development machine the machine name and user names are different to that on the remote machine. I am using Windows Auth. The application successfully runs on the remote machine. It even updates the same database (as mentioned in the issue above) on a different form which all connection strings etc were created automatically by c#. I'm pretty new to all this and don't know where to go from here.
Any help would be greatly appritiated.
Thanks
Jon.
Hi,
The error message says that you have Windows Authentication , change it to SQL/Mix Authentication and your application will run.
Refer below links
http://support.microsoft.com/kb/555332
http://hemantgirisgoswami.blogspot.com/2006/11/change-authentication-mode-with.html
And also refer How to enable Remote Connection
blogs.msdn.com/sqlexpress/
http://support.microsoft.com/kb/914277/en-us
Hemantgiri S. Goswami
|||Thanks. I will give that a try.|||Hi Hemantgiri,Thanks for the reply. Do I need to change this in SQL Man Studio Express or in my application?
Sorry, I'm new to this
Thanks
Jon|||
Hi,
You need to change this in your SQL Server Properties using SQL Server Management Studio.
1. Open Your SQL Server Management Studio
2. Connect / Login to Server
3. Right Click on the Server Name
4. Click on Properties
5. Select Security
6. Select the option "SQL Server and Windows Authentication Mode" under Server Authentication
7. Click Ok
Hemantgiri S. Goswami
|||ThanksMonday, March 19, 2012
cannot open database "northwind" why
can any one help me is my connection string right ...
i am using sql server 2005 ..
my system name is soft18 ..
Server Error in '/prjLogin' Application.
Cannot open database "Northwind" requested by the login. The login failed.
Login failed for user 'SOFT18\Administrator'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Cannot open database "Northwind" requested by the login. The login failed.
Login failed for user 'SOFT18\Administrator'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.Stack Trace:
[SqlException (0x80131904): Cannot open database "Northwind" requested by the login. The login failed.Login failed for user 'SOFT18\Administrator'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +115
System.Data.SqlClient.TdsParser.ThrowExcepti....................
........................
................
...................
//web.config
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>
<add name="QuickStartSqlServer" connectionString="Server=localhost\SQLExpress;Integrated Security=SSPI;Database=Northwind;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<authentication mode="Forms">
<forms name=".ASPXAUTH"
loginUrl="Login.aspx"
protection="All"
timeout="30"
path="/"
requireSSL="false"
slidingExpiration="true"
defaultUrl="Login.aspx"
cookieless="UseDeviceProfile"
enableCrossAppRedirects="false"/>
</authentication>
<membership defaultProvider="QuickStartMembershipSqlProvider"
userIsOnlineTimeWindow="15">
<providers>
<add
name="QuickStartMembershipSqlProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="QuickStartSqlServer"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
applicationName="LoginControls"
requiresUniqueEmail="true"
passwordFormat="Hashed"/>
</providers>
</membership>
<roleManager
enabled="true"
cacheRolesInCookie="true"
defaultProvider="QuickStartRoleManagerSqlProvider"
cookieName=".ASPXROLES"
cookiePath="/"
cookieTimeout="30"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
createPersistentCookie="false"
cookieProtection="All">
<providers>
<add name="QuickStartRoleManagerSqlProvider"
type="System.Web.Security.SqlRoleProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="QuickStartSqlServer"
applicationName="LoginControls"/>
</providers>
</roleManager>
<authorization>
<allow users="*"/>
</authorization>
<compilation debug="true"/>
</system.web>
</configuration>You really, really, really should not do that becasue this leaves a security hole for SQL injection, imagine you user input (which should be treaten as suspious), enter in the textbox2 the following text:
'',NULL'); DROP DATABASE model; --
THis would cause the model database to be dropped, I am sure you don′t want to do this. :-) Always use parametrized queries for the access, that can′t be comnposed as easy as in the sample code of yours.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
Cannot open database "aspnetdb.mdf" requested by the login. The login failed.
Hello Guys
This is my connection string
<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .\SQLEXPRESS; Integrated Security = True; DataBase = ASPNETDB.MDF; User ID = MyWindowsUserName; Password = MyWindowsPassword; User Instance = False; Connect Timeout = 30" providerName ="System.Data.SqlClient"/>
I tried to research on the internet and i got a solution on changing the permissions for this database to enable user SystemName/ASPNET, but iam not able to access this ASPNETDB.MDF from SqlServer and if i go to server explorer in vs2005, i dint know where to chage the permissions.
Can anyone help me on this.
Thanks a lot
The ASPNET account needs to have access both to the server and to the ASPNETDB database. It seems you have granted server access to the account, but not database access.
To grant database access, connect to SQL Server using Management Studio and execute the following SQL statements:
use ASPNETDB
go
create user [SystemName\ASPNET]
go
Thanks
Laurentiu
hi,
Thanks for your info abt the adding of aspnet account in the ASPNETDB Db.
I have created a website using VS 2005, and my SQL Server 2005 -STD Edition(NOT SQLEXPRESS). When ever i try to connect to the database i get this following error : Cannot open database ASPNETDB.MDF requested by the login, login failed. Login failed for user DOMAIN|USERNAME.
FYI, I have added my DOMAIN\username in the Security - Logins of the Database. I have also done the user mappings. That screen reads as follows :
1. Master Database -
Still I get this error. Please help me understand that whether any other permissions is required in the database for me.
Thanks
krans001
|||hi,
I get this error when i try to execute a website just having a DEFAULT.aspx in which i have added a webpartsmanager. the personalization property of the webpartmanager is set to TRUE and USER. The following steps I did:
1. Installed the Microsoft SQL Server Management Studio 9.00.1399.00 ( STANDERD EDITION).
2. from the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 installed the aspnet_regsql and followed the steps in installing the aspnetdb database.
In the usermappings i have provided permissions to me "DOMAIN\USERNAME" to the following db: 1. master 2. msdb 3. tempdb 4. aspnetdb
3. in the edit global configuration removed the USER INSTANCE=TRUE from the following
Data Source=.\MSSQLSERVER2005;Initial Catalog=aspnetdb.mdf;Integrated Security=True
4. edited the machine.config file under the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG
as
<add name="LocalSqlServer" connectionString="Data Source=.\MSSQLSERVER2005;Initial Catalog=aspnetdb.mdf;Integrated Security=True" providerName="System.Data.SqlClient" />
After doing this i tried to execute the website that i have created which holds a default.aspx page in which i have the webpartmanager. I just wanted to view this file in the browser. As soon as i do this i get this error.
Cannot open database "aspnetdb.mdf" requested by the login. The login failed. Login failed for user 'DOMAIN\USERNAME'.
Thanks in advance for the solution. Please help.. if anyone has a solution please send it immediately to my email id : sriranga.kr@.gmail.com
|||hi
all i did was removed the .mdf in the connection string and run the same. It works like a charm..
great...
|||hi sreeksdave
all you need to do is to change the following :
<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .\SQLEXPRESS; Integrated Security = True; DataBase = ASPNETDB.MDF; User ID = MyWindowsUserName; Password = MyWindowsPassword; User Instance = False; Connect Timeout = 30" providerName ="System.Data.SqlClient"/>
AS
<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .\SQLEXPRESS; Integrated Security = True; Initial Catalog= ASPNETDB" providerName ="System.Data.SqlClient"/>
and see how it works..
Do let me know..
Regards
scotty
|||I think this should be rather aspnetdb than aspnetdb.mdf, if you use a user instance you have to specify the filename but with attached database you can just type in the name of the database.HTH, jens Suessmeyer.
http://www.sqlserver2005.de|||
Remember that both files ASPNETDB.MDF and aspnetdb_log.LDF are in a folder call App_Data in you project solution, just make sure that you give the right access privileges to your local MACHINE\ASPNET account
Hope this will help
|||Hi all,
Thanks for all your contribution. It has worked for me and i have also helped few people.
Thanks & Regards
Raaj
|||Hello Ranga,
Thanks a lot yar.
Hats off
Cannot open database "dbname" requested by the login. The login failed
login. The login failed.Keep getting Database connection error at
midnight, and then loss of data. Happens 1-2 times per week (but not
every day).As the failure is only once or twice a week I don't believe
the failure is related to the login, also the service is running as
local system, and the database connection is using Integrated Security.
The SQL service is running.has some one come across this issue?
Thanks in advance..
Andzandz
Is it SQL Server 2000?
Can you check your server errorlog and post the errors that show up there?
"andz" <anand411@.gmail.com> wrote in message
news:1153814521.878454.281140@.b28g2000cwb.googlegroups.com...
> Failed to open database: Cannot open database "dbname" requested by the
> login. The login failed.Keep getting Database connection error at
> midnight, and then loss of data. Happens 1-2 times per week (but not
> every day).As the failure is only once or twice a week I don't believe
> the failure is related to the login, also the service is running as
> local system, and the database connection is using Integrated Security.
> The SQL service is running.has some one come across this issue?
> Thanks in advance..
> Andz
>|||Hi Uri...
Herez the server error lod..
Server log extract:
2006-07-25:00:01:07 Bytes served today 8442940
2006-07-25:00:01:07 Date changed to 7/25/2006
2006-07-25:00:01:09 Failed to open database: Cannot open database
"WhosOnV4" requested by the login. The login failed.
2006-07-25:00:01:10 Could not reopen database.
Extract from SQL log:
7/24/2006 11:53:55 PM Successfully logged in and out of SQL Server
vizhost5\sql2005 login=sa
7/25/2006 12:08:55 AM Successfully logged in and out of SQL Server
vizhost5\sql2005 login=sa
7/25/2006 12:23:55 AM Successfully logged in and out of SQL Server
vizhost5\sql2005 login=sa
Database connection string:
Provider=SQLNCLI;Initial Catalog=WhosOnV4;Data
Source=VIZHOST5\SQL2005;Integrated Security=SSPI;
Uri Dimant wrote:[vbcol=seagreen]
> andz
> Is it SQL Server 2000?
> Can you check your server errorlog and post the errors that show up there?
>
> "andz" <anand411@.gmail.com> wrote in message
> news:1153814521.878454.281140@.b28g2000cwb.googlegroups.com...|||andz
Check MDAC versions ,seems that comes from OLEDB provider.
Take a look at this
http://support.microsoft.com/defaul...kb;en-us;Q31454
"andz" <anand411@.gmail.com> wrote in message
news:1153824325.168904.149550@.b28g2000cwb.googlegroups.com...
> Hi Uri...
> Herez the server error lod..
> Server log extract:
> 2006-07-25:00:01:07 Bytes served today 8442940
> 2006-07-25:00:01:07 Date changed to 7/25/2006
> 2006-07-25:00:01:09 Failed to open database: Cannot open database
> "WhosOnV4" requested by the login. The login failed.
> 2006-07-25:00:01:10 Could not reopen database.
> Extract from SQL log:
> 7/24/2006 11:53:55 PM Successfully logged in and out of SQL Server
> vizhost5\sql2005 login=sa
> 7/25/2006 12:08:55 AM Successfully logged in and out of SQL Server
> vizhost5\sql2005 login=sa
> 7/25/2006 12:23:55 AM Successfully logged in and out of SQL Server
> vizhost5\sql2005 login=sa
> Database connection string:
> Provider=SQLNCLI;Initial Catalog=WhosOnV4;Data
> Source=VIZHOST5\SQL2005;Integrated Security=SSPI;
> Uri Dimant wrote:
>|||Thanks a lot for you response...
MDAC version is 2.82.1830.....Application not closed when maintenance
jobs or backup jobs are being done on the database.However, although a
'sleep' has now been configured for the application during the backup
period.
Andz
Uri Dimant wrote:[vbcol=seagreen]
> andz
> Check MDAC versions ,seems that comes from OLEDB provider.
> Take a look at this
> http://support.microsoft.com/defaul...kb;en-us;Q31454
> "andz" <anand411@.gmail.com> wrote in message
> news:1153824325.168904.149550@.b28g2000cwb.googlegroups.com...
Cannot open database "dbname" requested by the login. The login failed
login. The login failed.Keep getting Database connection error at
midnight, and then loss of data. Happens 1-2 times per week (but not
every day).As the failure is only once or twice a week I don't believe
the failure is related to the login, also the service is running as
local system, and the database connection is using Integrated Security.
The SQL service is running.has some one come across this issue?
Thanks in advance..
Andzandz
Is it SQL Server 2000?
Can you check your server errorlog and post the errors that show up there?
"andz" <anand411@.gmail.com> wrote in message
news:1153814521.878454.281140@.b28g2000cwb.googlegroups.com...
> Failed to open database: Cannot open database "dbname" requested by the
> login. The login failed.Keep getting Database connection error at
> midnight, and then loss of data. Happens 1-2 times per week (but not
> every day).As the failure is only once or twice a week I don't believe
> the failure is related to the login, also the service is running as
> local system, and the database connection is using Integrated Security.
> The SQL service is running.has some one come across this issue?
> Thanks in advance..
> Andz
>|||Hi Uri...
Herez the server error lod..
Server log extract:
2006-07-25:00:01:07 Bytes served today 8442940
2006-07-25:00:01:07 Date changed to 7/25/2006
2006-07-25:00:01:09 Failed to open database: Cannot open database
"WhosOnV4" requested by the login. The login failed.
2006-07-25:00:01:10 Could not reopen database.
Extract from SQL log:
7/24/2006 11:53:55 PM Successfully logged in and out of SQL Server
vizhost5\sql2005 login=sa
7/25/2006 12:08:55 AM Successfully logged in and out of SQL Server
vizhost5\sql2005 login=sa
7/25/2006 12:23:55 AM Successfully logged in and out of SQL Server
vizhost5\sql2005 login=sa
Database connection string:
Provider=SQLNCLI;Initial Catalog=WhosOnV4;Data
Source=VIZHOST5\SQL2005;Integrated Security=SSPI;
Uri Dimant wrote:
> andz
> Is it SQL Server 2000?
> Can you check your server errorlog and post the errors that show up there?
>
> "andz" <anand411@.gmail.com> wrote in message
> news:1153814521.878454.281140@.b28g2000cwb.googlegroups.com...
> > Failed to open database: Cannot open database "dbname" requested by the
> > login. The login failed.Keep getting Database connection error at
> > midnight, and then loss of data. Happens 1-2 times per week (but not
> > every day).As the failure is only once or twice a week I don't believe
> > the failure is related to the login, also the service is running as
> > local system, and the database connection is using Integrated Security.
> > The SQL service is running.has some one come across this issue?
> >
> > Thanks in advance..
> > Andz
> >|||andz
Check MDAC versions ,seems that comes from OLEDB provider.
Take a look at this
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q31454
"andz" <anand411@.gmail.com> wrote in message
news:1153824325.168904.149550@.b28g2000cwb.googlegroups.com...
> Hi Uri...
> Herez the server error lod..
> Server log extract:
> 2006-07-25:00:01:07 Bytes served today 8442940
> 2006-07-25:00:01:07 Date changed to 7/25/2006
> 2006-07-25:00:01:09 Failed to open database: Cannot open database
> "WhosOnV4" requested by the login. The login failed.
> 2006-07-25:00:01:10 Could not reopen database.
> Extract from SQL log:
> 7/24/2006 11:53:55 PM Successfully logged in and out of SQL Server
> vizhost5\sql2005 login=sa
> 7/25/2006 12:08:55 AM Successfully logged in and out of SQL Server
> vizhost5\sql2005 login=sa
> 7/25/2006 12:23:55 AM Successfully logged in and out of SQL Server
> vizhost5\sql2005 login=sa
> Database connection string:
> Provider=SQLNCLI;Initial Catalog=WhosOnV4;Data
> Source=VIZHOST5\SQL2005;Integrated Security=SSPI;
> Uri Dimant wrote:
>> andz
>> Is it SQL Server 2000?
>> Can you check your server errorlog and post the errors that show up
>> there?
>>
>> "andz" <anand411@.gmail.com> wrote in message
>> news:1153814521.878454.281140@.b28g2000cwb.googlegroups.com...
>> > Failed to open database: Cannot open database "dbname" requested by the
>> > login. The login failed.Keep getting Database connection error at
>> > midnight, and then loss of data. Happens 1-2 times per week (but not
>> > every day).As the failure is only once or twice a week I don't believe
>> > the failure is related to the login, also the service is running as
>> > local system, and the database connection is using Integrated Security.
>> > The SQL service is running.has some one come across this issue?
>> >
>> > Thanks in advance..
>> > Andz
>> >
>|||Thanks a lot for you response...
MDAC version is 2.82.1830.....Application not closed when maintenance
jobs or backup jobs are being done on the database.However, although a
'sleep' has now been configured for the application during the backup
period.
Andz
Uri Dimant wrote:
> andz
> Check MDAC versions ,seems that comes from OLEDB provider.
> Take a look at this
> http://support.microsoft.com/default.aspx?scid=kb;en-us;Q31454
> "andz" <anand411@.gmail.com> wrote in message
> news:1153824325.168904.149550@.b28g2000cwb.googlegroups.com...
> > Hi Uri...
> >
> > Herez the server error lod..
> >
> > Server log extract:
> >
> > 2006-07-25:00:01:07 Bytes served today 8442940
> > 2006-07-25:00:01:07 Date changed to 7/25/2006
> > 2006-07-25:00:01:09 Failed to open database: Cannot open database
> > "WhosOnV4" requested by the login. The login failed.
> > 2006-07-25:00:01:10 Could not reopen database.
> >
> > Extract from SQL log:
> >
> > 7/24/2006 11:53:55 PM Successfully logged in and out of SQL Server
> > vizhost5\sql2005 login=sa
> > 7/25/2006 12:08:55 AM Successfully logged in and out of SQL Server
> > vizhost5\sql2005 login=sa
> > 7/25/2006 12:23:55 AM Successfully logged in and out of SQL Server
> > vizhost5\sql2005 login=sa
> >
> > Database connection string:
> > Provider=SQLNCLI;Initial Catalog=WhosOnV4;Data
> > Source=VIZHOST5\SQL2005;Integrated Security=SSPI;
> >
> > Uri Dimant wrote:
> >> andz
> >> Is it SQL Server 2000?
> >>
> >> Can you check your server errorlog and post the errors that show up
> >> there?
> >>
> >>
> >>
> >> "andz" <anand411@.gmail.com> wrote in message
> >> news:1153814521.878454.281140@.b28g2000cwb.googlegroups.com...
> >> > Failed to open database: Cannot open database "dbname" requested by the
> >> > login. The login failed.Keep getting Database connection error at
> >> > midnight, and then loss of data. Happens 1-2 times per week (but not
> >> > every day).As the failure is only once or twice a week I don't believe
> >> > the failure is related to the login, also the service is running as
> >> > local system, and the database connection is using Integrated Security.
> >> > The SQL service is running.has some one come across this issue?
> >> >
> >> > Thanks in advance..
> >> > Andz
> >> >
> >
Cannot open connection to AS 2005
Hi All,
I have installed AS 2005 and am using VS 2005 and .Net 2.0.
Connection to AS 2005 is configured for HTTP.
Whenever I open a connection it gives me below error.
"Object not found".
Stack Trace:
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)\r\n
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)\r\n
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)\r\n
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)\r\n
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)\r\n
at System.Data.OleDb.OleDbConnection.Open()\r\n
Below is peace of code:
string Connection = "Provider=MSOLAP.2;Data Source=http://localhost/olap; Initial Catalog=Cube1";
conn = new OleDbConnection(Connection);
conn.Open();
string Query = " ";
OleDbCommand dbCommand = new OleDbCommand(Query, conn);
dbCommand.CommandType = CommandType.Text;
dtrdr = dbCommand.ExecuteReader();I have .Net 1.1 installed and vs.net 2003 as well as ADOMD.Net 8.0.
I guess when VS.NET 2005 is installed, ADOMD.NET 9.0 should be automatically installed.
Do I need to install ADOMD.Net 9.0 manually.
Appreciate your help as this issue needs to be resolved urgently.
Regards,
Try using
Provider=MSOLAP
rather than
Provider=MSOLAP.2
In your connection string. MSOLAP.2 is the AS2K version of the provider and will probably have problems connecting to AS2005.
Also, the Initial Catalog property should refer to the name of the AS database you're connecting to, not a cube. Is your database really called 'Cube1'?
You may also need to install ADOMD.Net 9.0 manually too...
Chris
|||Hi Chris,
I tried with Provider=MSOLAP but could not succeed.
You are right. I wrote Cube1 instead of Database name in my post by mistake.
I tried with TCP/IP connection. But I got different error now. It says
"Can not connect to server. Server is either not started or too busy"
But I can view Database in SQL Server Management .
Regards,
|||Try getting rid of "http://" from your connection string.
Also, you talk about using ADOMD NET 9.0, but you are using OLEDB...which do you want to use?
|||Hi,
I am not sure if you have to remove "http://" from the connection string, but.....
Try the following:
1. Try using the provider MSOLAP .3 also.
2. Next, add the user account IUSR to a role with required permissions in SSAS 2005.
3. Another check is to see if you have configured msmdpump to connect to the specific SSAS server.
4. The connection string must include msmdpump.dll in the path (see exmaple)
5. Also the connection string can include a username and password. here is an example:
"Provider=MSOLAP.3;
Persist Security Info=True;
Data Source=http://[target server]/olap/msmdpump.dll;
Initial Catalog=PNGReportOLAP;
User Id=[user id];Password=[password]"
6. Read this link for all other details on connectivity problems to ssas 2005 :
http://www.sqljunkies.com/WebLog/edwardm/archive/2006/05/26/21447.aspx
7. For more details on connection strings, check this article:
http://www.connectionstrings.com/
8. An additional thing which I wanted to mention is, you need to use .Net 2.0. only. I am not sure if .Net 1.1 supports ADOMD.Net and some connection features of ssas 2005.
Hope this helps
Regards
Cannot open connection to Access Database.
I am very new to VB.Net but my goal is to build a web app that ineracts with an Access database. This is a very small scale app so I am not interested in using SQL server. I created my Access database and the udl file for connection information.
I created a class that opens a connection to the database when the webpage loads.
I get the following error though,
System.Data.OleDb.OleDbException was unhandled by user code
ErrorCode=-2147467259
Message="The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\Test1\RaceData.mdb'. It is already opened exclusively by another user, or you need permission to view its data."
Source="Microsoft JET Database Engine"
StackTrace:
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at clsDBConn.Open_Connection() in c:\inetpub\wwwroot\Test1\App_Code\clsDBConn.vb:line 12
at Default2.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Test1\Default2.aspx.vb:line 8
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
The database is not open so I know it is a matter of security. I have configured IIS to use an admin account and the Access db does not have security turned on. In the UDL file I have selected read/write access and the test connection works.
Can anyone help me narrow down the root of this error,
Thanx in advance,
Chris
Topfuel5
Hi,
The Error is self descriptive that means either you don't have proper privilege or the file is either opened in Edit Mode refer below links for work around
http://support.microsoft.com/kb/174943 & http://www.xlinesoft.com/asprunner/docs/error_the_microsoft_jet_database_engine_cannot%20open%20the%20file%20(unknown).htm
Hemantgiri S. Goswami
Cannot open connection Dialog when starting SQL Server Management Studio
I start SQL Server Management Studio on my workstation and get the following message.
TITLE: Microsoft SQL Server Management Studio
Failed to open connection dialog.
ADDITIONAL INFORMATION:
Could not load file or assembly 'SqlMgmt, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) (mscorlib)
BUTTONS:
OK
I had SQl Express version installed previously and everything worked. I could connect to one server running SQL Express and a different server running full up SQL 2005 enterprise version.
I uninstalled All SQL express programs and installed tools from SQL 2005 developer.
I have rebooted, started the program directly (not using a link of any kind) and all attempts fail. After dismissing the error msg the tool opens and I can run queries agains the DB but the database engines and related tables do not show.
My work station is Windows XP with SP2 installed.
I have googled the problem extensively and tried solutions found but none have solved the problem.
Any help greatly appreciated.
I uninstalled all SQL Server components, deleted all directories (there were no files) in the installation directory. Then reinstalled SQL Server 2005 developer edition. All management tools appear to work correctly.Cannot open a connection with SQL Server 2005 Developer Edition.
In the same time I have made a test program to test the new SQL Server 2005 using DB Library or ATL OLE DB Consumer Templates.
The Both test programs are not running because I cannot open a connection on the SQL Server.
I've tried using the Windows Authentification and the SQL Server Authentification too. The both methods are not able to connect with the SQL Server.
The Programs are written in Visual C++ under the Visual Studio 2005.
I need help to my problems!
First why I cannot connect to the Sql Server. With DB Library example I was able to do it with a Beta Version from SQL Server 2005 but not any more with the CTP Version.
Why I cannot connect with the ATL OLE DB Consumer Templates ?
I want to hear some experiences from others developers with this CTP Version from SQL Server 2005.
It is really so buggy or it is not compatible with Window Server 2003 or it is because after installing the SQL Server 2005 I have made an update of the Visual Studio 2005 to be able to create Projects in Visual C++ and run some examples ?
The problem was that with the Visual Studio that it is coming with the SQL Server I was not able to create any Project under Visual C++ because I was receiving an error that the Template for the Visual C++ failed.
I need help !
For the detailed information about the Versions please read the next list:
Microsoft SQL Server Management Studio - Version 9.0.1187.
MDAC - Version 2000.086.1830.00(srv03_sp1_rtm.050324_1447)
Microsoft .Net Framework - Version 2.0.50712.6.
Microsoft Visual Studio 2005 - Version 8.0.50712.6(lab23df.050712-0600)
The Operating System it is an Windows Server 2003 Professional Version with SP1.
What are the specific errors you are seeing when you try to connect to SQL Server. Could you please post your sample code
SQL Server projects are only available in Visual Studio pro. SKU and above. What SKU of Visual Studio are you using. Are you able to get C# and VB.NET SQL Server projects working?
Thanks,
-Vineet.|||So first what you've asked:
The Visual Studio Version it is :
Team Edition for Software Architects. Version 8.0.50712.6(lab23df.050712-0600)
It is installed from MSDN Team Suite DVD Beta 2 Version.
The Windows it is Windows 2003 Server Enterprise Edition(first time I was wrong, it was no Profesional version) with SP1.
The c# or VB.Net projects are working just fine. Only the connection to Sql Server it is not working.
The Sample code I will send you in the project on your email address:vineetr@.microsoft.com. The project it is imported from Visual Studio 6.0 Samples and coverted to Visual Studio 2005. It is writed in unmanaged code in Visual c++. Please don't forget to copy the db library files that are included in the archive on C:\ or to change the path for include in the code.
In the Sample I am using two tables here it is the SQL code to create the tables:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TestTable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[TestTable]
GO
CREATE TABLE [dbo].[TestTable] (
[Id] uniqueidentifier ROWGUIDCOL NOT NULL ,
[Text1] [varchar] (10) COLLATE Latin1_General_CI_AS NOT NULL ,
[Text2] [char] (10) COLLATE Latin1_General_CI_AS NOT NULL ,
[Int1] [int] NOT NULL ,
[Float1] [float] NOT NULL ,
[Short1] [smallint] NOT NULL
) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [index_clustered] ON [dbo].[TestTable]([Id] DESC ) ON [PRIMARY]
GO
CREATE INDEX [index_mixt] ON [dbo].[TestTable]([Int1] DESC , [Short1] DESC ) ON [PRIMARY]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TestTable2]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[TestTable2]
GO
CREATE TABLE [dbo].[TestTable2] (
[autoid] [int] IDENTITY (1, 1) NOT NULL ,
[value1] [int] NULL ,
[value2] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TestTable2] WITH NOCHECK ADD
CONSTRAINT [PK_TestTable2] PRIMARY KEY CLUSTERED
(
[autoid]
) ON [PRIMARY]
GO
In the mean time I have made some more research trying to find where the problem it is located. In the Sql Server components or in the library components that I am using in my code example (DB Library and ATL OLE DB Comsumer Templates library) and I found the next problem:
In the Microsoft Management Studio I have made the next four steps:
1. Create the tables ruuning the upper script. After this you will find in the database two sample tables TestTable and TestTable2.
2.Run the Query : Select * from TestTable2. No result but no error too.
3.Run the Query :Insert into testTable2 values (1,1). No I get allready the timeout Error and the query it is making the insert in the Table (Unexpected behavior).
4.Run the Query again: Select * from TestTable2. To check and see if the insert it is made. Now we can see in the table one row with the just inserted result. I got an error and the query it it succesfully executed.
Please see the archive that I will send you in there you will find the print screens.
So my opinion it is that the problem it is in the SQL Server itself.
This Timeout error I got it in the Microsoft Management Studio when I try to update some properties from Databases, Updating properties from the Server itself or Scripting a table etc...
I my head it stays one modification that I have made in the timeout value for the connections in the SQL Server properties. I have seted the value to 6000 and after a while again to 0(no limit). And after this modification I've retarted the computer (all the SQL server services should read again the settings after restart).
This can be one reason. The second reason can be: I have made some modification for the protocolls to access the SQL Server from another remote computer. I have read that default it cannot be accesed remote.
Anyhow I have undone all the modification and still the SQL it not reacting normally (when I access the Sql Server locally- or just from the Microsoft Management Studio ).
So please read your email to get the sample code and the print screen with th errors. I f you need more print screen with other error please tell me.
I wait for your help.
Thanks,
Vasile.|||I want help.
Do you need more infos ?
Have you found something ?
Can somebody help ?
Maybe I should wait for the release version.
Cannot open a connection
application, the reporting section show me the following error: "The report
server cannot open a connection to the report server database. A connection
to the database is required for all requests and processing.
(rsReportServerDatabaseUnavailable) SQL Server does not exist or access
denied". Then it show me the following warning: "An unhandled exception of
type
'Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerDatabaseUnavailableException' occurred in microsoft.reportingservices.diagnostics.dll
Additional information: The report server cannot open a connection to the
report server database. A connection to the database is required for all
requests and processing."
Any ideas?
Thanks in advance.First thing is to make sure the report works outside of your application.
Have you tried the report from Report Manager, does it work from there?
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"mlugoc" <mlugoc@.discussions.microsoft.com> wrote in message
news:A33D1D4C-7E66-4A8F-93F3-06293284BFD6@.microsoft.com...
>I am using reporing services in my c# web application. When I debug my web
> application, the reporting section show me the following error: "The
> report
> server cannot open a connection to the report server database. A
> connection
> to the database is required for all requests and processing.
> (rsReportServerDatabaseUnavailable) SQL Server does not exist or access
> denied". Then it show me the following warning: "An unhandled exception
> of
> type
> 'Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerDatabaseUnavailableException'
> occurred in microsoft.reportingservices.diagnostics.dll
> Additional information: The report server cannot open a connection to the
> report server database. A connection to the database is required for all
> requests and processing."
> Any ideas?
> Thanks in advance.
>|||Yes, I used Report Manager to test my report and it works great.
"Bruce L-C [MVP]" wrote:
> First thing is to make sure the report works outside of your application.
> Have you tried the report from Report Manager, does it work from there?
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "mlugoc" <mlugoc@.discussions.microsoft.com> wrote in message
> news:A33D1D4C-7E66-4A8F-93F3-06293284BFD6@.microsoft.com...
> >I am using reporing services in my c# web application. When I debug my web
> > application, the reporting section show me the following error: "The
> > report
> > server cannot open a connection to the report server database. A
> > connection
> > to the database is required for all requests and processing.
> > (rsReportServerDatabaseUnavailable) SQL Server does not exist or access
> > denied". Then it show me the following warning: "An unhandled exception
> > of
> > type
> > 'Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerDatabaseUnavailableException'
> > occurred in microsoft.reportingservices.diagnostics.dll
> >
> > Additional information: The report server cannot open a connection to the
> > report server database. A connection to the database is required for all
> > requests and processing."
> >
> > Any ideas?
> > Thanks in advance.
> >
> >
>
>