Click here to Skip to main content
15,898,134 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL Help - sum items based on max but also smaller than...? [modified] Pin
GlobX7-Mar-11 12:12
GlobX7-Mar-11 12:12 
GeneralRe: SQL Help - sum items based on max but also smaller than...? Pin
Wendelius7-Mar-11 18:37
mentorWendelius7-Mar-11 18:37 
AnswerRe: SQL Help - sum items based on max but also smaller than...? Pin
GlobX7-Mar-11 13:05
GlobX7-Mar-11 13:05 
Questioncopy data from 1 table to another table Pin
bapu28895-Mar-11 6:07
bapu28895-Mar-11 6:07 
AnswerRe: copy data from 1 table to another table Pin
Mycroft Holmes5-Mar-11 12:07
professionalMycroft Holmes5-Mar-11 12:07 
AnswerRe: copy data from 1 table to another table Pin
PIEBALDconsult5-Mar-11 14:48
mvePIEBALDconsult5-Mar-11 14:48 
QuestionRe: copy data from 1 table to another table Pin
bapu28895-Mar-11 19:57
bapu28895-Mar-11 19:57 
QuestionRead only ADO connection still allows writing to database? Pin
PJ Arends4-Mar-11 17:54
professionalPJ Arends4-Mar-11 17:54 
Sorry for the cross/re post, but I really need a solution to this problem. So far I have had the question posted for two days with only 50 views and no hints or answers. I really do not want to have to go through the effort of sanitizing out any possible writes. I can not set the database to be readonly at the file level as there is another app that has to have read-write access. I would think there should be a way for SQLServer to simply refuse to do any write operations for a readonly connection, but I have not been able to figure it out so far.

http://www.codeproject.com/Questions/164065/Read-only-ADO-connection-still-allows-writing-to-d.aspx[^]

I wrote:
I have connected to my SQL Server 2005 database by using ADO (through A set of ADO classes - version 2.20 by Carlos Antollini[^]). Now I have set the connection mode to be ReadOnly
CADODatabase *pDatabase = NULL;
pDatabase = new CADODatabase();
pDatabase->SetConnectionString(MyConnectionString);
pDatabase->SetConnectionMode(CADODatabase::connectModeRead);
pDatabase->Open();

SetConnectMode() calls ADODB::Connection15::PutMode
and CADODatabase::connectModeRead is adModeRead.

Now my understanding is that setting the adModeRead mode should make the database connection read-only. But a simple test of the connection shows that I can use the connection to create and drop tables, as well as insert and update data.

How can I make the connection truely read-only?


You may be right
I may be crazy
-- Billy Joel --


Within you lies the power for good - Use it!

AnswerRe: Read only ADO connection still allows writing to database? Pin
Mycroft Holmes4-Mar-11 19:59
professionalMycroft Holmes4-Mar-11 19:59 
GeneralRe: Read only ADO connection still allows writing to database? Pin
PJ Arends6-Mar-11 10:26
professionalPJ Arends6-Mar-11 10:26 
GeneralRe: Read only ADO connection still allows writing to database? Pin
Mycroft Holmes6-Mar-11 11:42
professionalMycroft Holmes6-Mar-11 11:42 
GeneralRe: Read only ADO connection still allows writing to database? Pin
PJ Arends6-Mar-11 17:51
professionalPJ Arends6-Mar-11 17:51 
GeneralRe: Read only ADO connection still allows writing to database? Pin
Mycroft Holmes6-Mar-11 18:01
professionalMycroft Holmes6-Mar-11 18:01 
QuestionUpdating Columns Pin
whatsa3-Mar-11 14:14
whatsa3-Mar-11 14:14 
AnswerRe: Updating Columns Pin
Luc Pattyn3-Mar-11 14:24
sitebuilderLuc Pattyn3-Mar-11 14:24 
GeneralRe: Updating Columns Pin
whatsa17-Mar-11 10:07
whatsa17-Mar-11 10:07 
AnswerRe: Updating Columns Pin
jschell3-Mar-11 15:27
jschell3-Mar-11 15:27 
GeneralRe: Updating Columns Pin
PIEBALDconsult3-Mar-11 16:34
mvePIEBALDconsult3-Mar-11 16:34 
QuestionSQL Server Authentication issue - Fixed, but I don't understand why Pin
gantww3-Mar-11 5:55
gantww3-Mar-11 5:55 
Questioncomplicated select Pin
benams3-Mar-11 5:16
benams3-Mar-11 5:16 
QuestionRe: complicated select Pin
Chris Meech3-Mar-11 8:45
Chris Meech3-Mar-11 8:45 
AnswerRe: complicated select Pin
Jörgen Andersson3-Mar-11 9:37
professionalJörgen Andersson3-Mar-11 9:37 
AnswerRe: complicated select Pin
Mycroft Holmes3-Mar-11 13:52
professionalMycroft Holmes3-Mar-11 13:52 
GeneralRe: complicated select Pin
benams4-Mar-11 7:35
benams4-Mar-11 7:35 
GeneralRe: complicated select Pin
Mycroft Holmes4-Mar-11 12:49
professionalMycroft Holmes4-Mar-11 12:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.