Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_database_setup thread: Excel Connection -> Error writing to Excel


Message #1 by "Matthias" <mhambach@w...> on Wed, 15 Aug 2001 09:07:56
Hi, I have built up a connection to a Excelfile and it works file to read 

out data from it.



However, the system would't allow me to write data into the File...



I get the following message, when using the commands "xlSheet.AddNew" 

and "xlSheet.Update":

"Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

[Microsoft][ODBC Excel Driver] Operation must use an updatable query." 



Does anybody know, how to get this running



Thanks in advance...

Matthias





Here is my code:



'settings

Set oConn = Server.CreateObject("ADODB.Connection")

oConn.Open "Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=" &_

   TempFile & ";DefaultDir=" & TempPath

Set xlSheet = Server.CreateObject("ADODB.Recordset")



'read out

For x = 0 To xlSheet.Fields.Count -1

  Response.Write xlSheet.Fields.Item(x).Name

Next



'write in

xlSheet.AddNew

For i = 0 To 4

  xlSheet.Fields(i).Value = i

Next

xlSheet.Update

Message #2 by "Vincent Vandermeeren" <vincent@v...> on Wed, 15 Aug 2001 19:49:41 +0200
Hi Matthias,

check the folder-permissions of the directory where the xlsheet is standing.

both users (Iuser and wanuser) should have the "change" rights.



Greetings,

Vinnie

----- Original Message -----

From: "Matthias" <mhambach@w...>

To: "ASP Database Setup" <asp_database_setup@p...>

Sent: Wednesday, August 15, 2001 9:07 AM

Subject: [asp_database_setup] Excel Connection -> Error writing to Excel





> Hi, I have built up a connection to a Excelfile and it works file to read

> out data from it.

>

> However, the system would't allow me to write data into the File...

>

> I get the following message, when using the commands "xlSheet.AddNew"

> and "xlSheet.Update":

> "Microsoft OLE DB Provider for ODBC Drivers error '80004005'

> [Microsoft][ODBC Excel Driver] Operation must use an updatable query."

>

> Does anybody know, how to get this running

>

> Thanks in advance...

> Matthias

>

>

> Here is my code:

>

> 'settings

> Set oConn = Server.CreateObject("ADODB.Connection")

> oConn.Open "Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=" &_

>    TempFile & ";DefaultDir=" & TempPath

> Set xlSheet = Server.CreateObject("ADODB.Recordset")

>

> 'read out

> For x = 0 To xlSheet.Fields.Count -1

>   Response.Write xlSheet.Fields.Item(x).Name

> Next

>

> 'write in

> xlSheet.AddNew

> For i = 0 To 4

>   xlSheet.Fields(i).Value = i

> Next

> xlSheet.Update



Message #3 by "Matthias" <mhambach@w...> on Mon, 20 Aug 2001 10:39:41
Vinnie,



thanks for the hint. Sounds reasonable....



I was talking to our IT guys and they said, that you can't set rights for 

these users....! (the file is located on the web-server)

Do you have any more suggestions or details about setting the rights for 

these users?



Thanks in advance

Matthias





> Hi Matthias,

> check the folder-permissions of the directory where the xlsheet is

> standing. both users (Iuser and wanuser) should have the "change"

> rights.

> 

> Greetings,

> Vinnie

Message #4 by "Vincent Vandermeeren" <vincent@v...> on Mon, 20 Aug 2001 19:52:05 +0200
There should always be a user like that !!

Did they checked on the domain of the network or on the "computer"-domain ??



If they check on the computer domain the users should be there !!

I have now 4 years of experince with ASP and I 'm for 100M sure that it has

something to with the permission

They have to check the permissions of the directory where the database is

standing

Normaly they should find there a Iuser and a WANuser.

iuser = internet user

wan user = the person who can change it

both users should have @ that place "change"-rights



If they don't know,

mail me you phonenumber and I'll call you from the office where I work

Greetings,

Vinnie



----- Original Message -----

From: "Matthias" <mhambach@w...>

To: "ASP Database Setup" <asp_database_setup@p...>

Sent: Monday, August 20, 2001 10:39 AM

Subject: [asp_database_setup] Re: Excel Connection -> Error writing to Excel





> Vinnie,

>

> thanks for the hint. Sounds reasonable....

>

> I was talking to our IT guys and they said, that you can't set rights for

> these users....! (the file is located on the web-server)

> Do you have any more suggestions or details about setting the rights for

> these users?

>

> Thanks in advance

> Matthias

>

>

> > Hi Matthias,

> > check the folder-permissions of the directory where the xlsheet is

> > standing. both users (Iuser and wanuser) should have the "change"

> > rights.

> >

> > Greetings,

> > Vinnie


  Return to Index