Click here to Skip to main content
15,897,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: .obj file Pin
CPallini26-Jul-07 23:13
mveCPallini26-Jul-07 23:13 
GeneralRe: .obj file Pin
ShilpiP26-Jul-07 23:22
ShilpiP26-Jul-07 23:22 
GeneralRe: .obj file Pin
Shouvik Das26-Jul-07 23:48
Shouvik Das26-Jul-07 23:48 
GeneralRe: .obj file Pin
CPallini27-Jul-07 0:03
mveCPallini27-Jul-07 0:03 
QuestionCreating xml file Pin
Maynka26-Jul-07 18:57
Maynka26-Jul-07 18:57 
AnswerRe: Creating xml file Pin
Christian Graus26-Jul-07 19:42
protectorChristian Graus26-Jul-07 19:42 
QuestionVC++ 6.0 with Sql Server Pin
shakumar_2226-Jul-07 18:53
shakumar_2226-Jul-07 18:53 
AnswerRe: VC++ 6.0 with Sql Server Pin
mandanani26-Jul-07 19:44
mandanani26-Jul-07 19:44 
Here below is the code snippet to directly give uid and pwd

#define CONNECT_STRING _T("DSN=xxxxxxxxxxx;UID=cccccccc; PWD=ccccccccccc")

m_pDBConn = new CDatabase();
BOOL w_bIsOpen = FALSE;
if(m_pDBConn)
{
try
{
//opens a connection to the data source
w_bIsOpen = m_pDBConn->OpenEx(CONNECT_STRING);
.......................

But with this way, you can not change your database password, with out rebuilding the application. The best way is to add two fields (uid and pwd) in the registry and read it from there. With this you can change uid and pwd with out rebuilding the application. But you need to encrypt the uid and password in the system registry, else any one can hack it.
GeneralRe: VC++ 6.0 with Sql Server Pin
shakumar_2226-Jul-07 21:18
shakumar_2226-Jul-07 21:18 
QuestionLPCTSTR and HRESULT Pin
George_George26-Jul-07 18:53
George_George26-Jul-07 18:53 
AnswerRe: LPCTSTR and HRESULT Pin
ShilpiP26-Jul-07 19:30
ShilpiP26-Jul-07 19:30 
GeneralRe: LPCTSTR and HRESULT Pin
George_George26-Jul-07 20:47
George_George26-Jul-07 20:47 
GeneralRe: LPCTSTR and HRESULT Pin
ShilpiP26-Jul-07 21:34
ShilpiP26-Jul-07 21:34 
GeneralRe: LPCTSTR and HRESULT Pin
George_George26-Jul-07 21:44
George_George26-Jul-07 21:44 
GeneralRe: LPCTSTR and HRESULT Pin
Shouvik Das26-Jul-07 23:58
Shouvik Das26-Jul-07 23:58 
GeneralRe: LPCTSTR and HRESULT Pin
George_George27-Jul-07 20:20
George_George27-Jul-07 20:20 
GeneralRe: LPCTSTR and HRESULT Pin
Iain Clarke, Warrior Programmer27-Jul-07 1:29
Iain Clarke, Warrior Programmer27-Jul-07 1:29 
GeneralRe: LPCTSTR and HRESULT Pin
George_George27-Jul-07 20:21
George_George27-Jul-07 20:21 
GeneralRe: LPCTSTR and HRESULT Pin
Shouvik Das29-Jul-07 18:37
Shouvik Das29-Jul-07 18:37 
GeneralRe: LPCTSTR and HRESULT Pin
George_George29-Jul-07 18:55
George_George29-Jul-07 18:55 
GeneralRe: LPCTSTR and HRESULT Pin
Shouvik Das29-Jul-07 19:13
Shouvik Das29-Jul-07 19:13 
GeneralRe: LPCTSTR and HRESULT Pin
George_George29-Jul-07 19:18
George_George29-Jul-07 19:18 
GeneralRe: LPCTSTR and HRESULT Pin
Shouvik Das29-Jul-07 19:22
Shouvik Das29-Jul-07 19:22 
GeneralRe: LPCTSTR and HRESULT Pin
Shouvik Das29-Jul-07 19:31
Shouvik Das29-Jul-07 19:31 
GeneralRe: LPCTSTR and HRESULT Pin
George_George29-Jul-07 19:46
George_George29-Jul-07 19:46 

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.