Thursday, March 8, 2012
Cannot update. Database or object are read-only
I've created Data Source File "test.dsn" and tested succesfully.
SQL Server database in on the other machine.
This is a code that I am using.
And error message I am geting is "Cannot update. Database or object are read-only".
Dim cn As ADODB.Connection
Dim strSQL As String
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Documents and Settings\pd\Desktop\Development\test.xls;" & _
"Extended Properties=Excel 8.0"
strSQL = "INSERT INTO [DSN = test.dsn].Region Values(5, 'ab');"
cn.Execute strSQL
cn.Close
Set cn = Nothing
Read-only of databse properties is not selected.If I get it right you're attempting to insert a row into excel. As long as I know it's not possible because you cannot update, insert records throught Jet provider. mojza|||Your query is unclear . Understanding you are trying to update region table In sql database .
if that's case you should then rather open an ODBC or OLE DB connection to SQL server
cn.Provider = "sqloledb"
cn.Properties("Data Source") = ServerName
cn.Properties("Initial Catalog") = DatabaseName
' If Windows NT authentication.
cn.Properties("Integrated Security")= "SSPI"
'If SQL Authentication
cn.Properties("User ID")= UserID
cn.Properties("Password") = pwd
' Open the database.
cn.Open
Dim strSQL as string
strSQL "INSERT INTO dbo.Region Values(5, 'ab')"
cn.execute strSQL
cn.close
set cn = nothing
Sunday, February 12, 2012
Cannot run Performance Dashboard on SQL Server 2005
All,
I running SQL Server 2005 on a 64-Bit build and getting the error " difference of two datetime cause overflow at runtime" when I try the open the Performance_Dashboard_Main .
Regards
Akin
Refer http://www.sql-server-performance.com/bm_performance_dashboard_2005.asp
Where to Get the SQL Server 2005 Performance Dashboard?
In order to install the SQL Server 2005 Dashboard, you must download at least two files from Microsoft. First, if you have not done so already, you must download SQL Server 2005 Service Pack 2. This is because Service Pack 2 includes new functionality that has been added to support the Performance Dashboard.
You can download SQL Server 2005 Service Pack 2 from:
www.microsoft.com/technet/prodtechnol/sql/2005/downloads
You can download the SQL Server 2005 Performance Dashboard add-on from:
www.microsoft.com/downloads
Madhu
|||Both performance Dashboard and SP2 have been installed on the server the problem is opening the Performance_Dashboard_main.RDL gives an error message "Difference of two datetime columns caused overflow at runtime"
|||It's a known issue when a login has been logged in for a long duration, you get the overflow error. You can find the fix for the error in this thread - read the very last post:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1747720&SiteID=1
-Sue