Showing posts with label interface. Show all posts
Showing posts with label interface. Show all posts

Thursday, March 8, 2012

Cannot update. Database or object are read-only

I have to build application Excel (interface) - SQL Server (backend)

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 uploaded HTML files

I am trying to run an HTML file from the Report Manager interface. It is an
HTML file with a flash file built into it. The interface lets me upload the
HTML file, but when I try to open it from Report Manager the web page just
looks like it's trying to render a blank page indefinitely. I have waited
up to 30 minutes and never get a page or error back. When I run this HTML
file locally it runs in under 1 second.
I have also tried very basic HTML files with just text on them and they
won't render in the Report Manager interface either.
What am I doing wrong?
Any help or advice is appreciated.I found my own answer on this. It appears that you cannot run HTML or SWF
files from a folder on RS that has an apostrophe in it. My folder has an
apostrophe in the name and can run reports just fine, but cannot open Flash
or HTML pages because of this. I renamed my folder and it fixed the
problem.
"brad peterman" wrote:
> I am trying to run an HTML file from the Report Manager interface. It is an
> HTML file with a flash file built into it. The interface lets me upload the
> HTML file, but when I try to open it from Report Manager the web page just
> looks like it's trying to render a blank page indefinitely. I have waited
> up to 30 minutes and never get a page or error back. When I run this HTML
> file locally it runs in under 1 second.
> I have also tried very basic HTML files with just text on them and they
> won't render in the Report Manager interface either.
> What am I doing wrong?
> Any help or advice is appreciated.|||I'll make sure that this bug is filed in our bug database.
--
Brian Welcker
Group Program Manager
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"brad peterman" <bradpeterman@.discussions.microsoft.com> wrote in message
news:B1DED78F-C2B3-4AA1-B64F-545D91744FD4@.microsoft.com...
>I found my own answer on this. It appears that you cannot run HTML or SWF
> files from a folder on RS that has an apostrophe in it. My folder has an
> apostrophe in the name and can run reports just fine, but cannot open
> Flash
> or HTML pages because of this. I renamed my folder and it fixed the
> problem.
> "brad peterman" wrote:
>> I am trying to run an HTML file from the Report Manager interface. It
>> is an
>> HTML file with a flash file built into it. The interface lets me upload
>> the
>> HTML file, but when I try to open it from Report Manager the web page
>> just
>> looks like it's trying to render a blank page indefinitely. I have
>> waited
>> up to 30 minutes and never get a page or error back. When I run this
>> HTML
>> file locally it runs in under 1 second.
>> I have also tried very basic HTML files with just text on them and they
>> won't render in the Report Manager interface either.
>> What am I doing wrong?
>> Any help or advice is appreciated.