dbwritetable unquote problem

Hi,

I'm running into an issue trying to create a table in a database.

Here is one variation of the code I've tried:

DBI::dbWriteTable(con,"MyDB.dbo.Test2",my_data_sample);

I get a permissions denied error which I understand.

The Error is:
Error: 'CREATE TABLE "MyDB.dbo.Test2" ( "MYVARNAME" varchar(255), "OUTPUT" FLOAT ) '

If I can get the create stament to be 'CREATE TABLE MyDB.dbo.Test2 ( "MYVARNAME....' Where the MyDB.dbo.Test2 does NOT have the quotes "" around it, my query would execute. I've verified this in SQL Server.

I've tried unquote() but got a different error.

Any thoughts?

Thanks in advance.

I figured out a way around it. Rather than using the ODBC DSN connection, I used a fully specified connection with the driver that allowed me to connect to an individual DB. My initial question is still interesting but at least that's a workaround for anyone else who find's this.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.