mfc >> Security Warning when creating a new class with MFC ODBC Consumer

by TWFub3g » Sat, 18 Mar 2006 02:40:27 GMT

With VC++ .NET 2003, i'm creating a new class (MFC ODBC container).
Everything seems to work until im about to generate the class.
I get this "Security Warning" message box text :
"The connection string in the generated code may contain plain text
passwords and/or sensitive information. Please review the wizard generated
code for details."

If I confirm this box, my whole VS closes automatically.

I tried with VC++ 6.0 and it worked perfectly. But i dont want do use
anymore this version.

Thanks

Vince


mfc >> Security Warning when creating a new class with MFC ODBC Consumer

by AliR » Sat, 18 Mar 2006 04:00:58 GMT


That's shows up because of a pragma in the code created by the ClassWizard.
Go to the file created for the CRecrodset class, and remove the pragma.

AliR.








Similar Threads

1. Security Warning when creating a new class with MFC ODBC Consumer

With VS C++ .NET 2003, i'm creating a new class (MFC ODBC container). 
Everything seems to work until im about to generate the class.
I get this "Security Warning" message box text :
"The connection string in the generated code may contain plain text 
passwords and/or sensitive information. Please review the wizard generated 
code for details."

If I confirm this box, my whole VS closes automatically.

I tried with VS C++ 6.0 and it worked perfectly. But i dont want do use 
anymore this version.

Thanks

Vince


2. Security Warning when creating a new class with MFC ODBC Consu

3. Problems with a MFC ODBC consumer class on ISAPI server

Hello,

I'm trying to read and write to an Access database, using an ISAPI server.

In order to do so, I've configured a MFC ODBC consumer class with the
following configuration:

- "Data Source" on the machine = Access Database (second Property Sheet of
"Select Datasource")
- "Type" is Dynaset
- "Bind all columns" checked.

The resulting connection string is the following:

------------ Example 1 ------------
CString CDatabase::GetDefaultConnect()
{
    return _T("DSN=MS Access
database;DBQ=C:\\Inetpub\\wwwroot\\data\\database.mdb;DefaultDir=C:\\Inetpub
\\wwwroot\\data;DriverId=25;FIL=MS
Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;");
}
------------------------------------

When I open the database through the command:

------------ Example 2 ------------
CDatabase db;

db.Open();
------------------------------------

The ISAPI server raises an exception that cannot be catched. I'm struggling
a lot to debug it. I have even tried to following connection strings:

------------ Example 3 ------------
1: DSN=MS Access
database;DBQ=\\\\localhost\\data\\database.mdb;DefaultDir=\\\\localhost\\dat
a;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;

2: DSN=MS Access
database;DBQ=/data/database.mdb;DefaultDir=/data;DriverId=25;FIL=MS
Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;
------------------------------------

But I still have the same problem. I use the same procedure to access the
database through a Document/View application and everything works fine as
Example 1, but I'm very confused now.

Thank you very much for your attention.
Ruy.


4. Adding MFC ODBC Consumer class fails in VS .NET 2003

5. MFC ODBC Consumer

I have two inherited MFC Recordset classes that connect to an access db file 
and query the same table. The first class represents the snapshot and the 
second the dynaset.  When I perform edit on the second one, the updates are 
registered much later after the Update method was run.  Hence the first 
class can't see the latest updates even if recordset is closed and opened or 
requeried.

Would anyone know why this is happening and how I could get around it?

Thanks in advance