Click here to Skip to main content
16,011,647 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: question on operator * and & Pin
Neo Andreson23-Oct-07 19:06
Neo Andreson23-Oct-07 19:06 
AnswerRe: question on operator * and & Pin
Nishad S23-Oct-07 20:30
Nishad S23-Oct-07 20:30 
GeneralRe: question on operator * and & Pin
toxcct24-Oct-07 1:33
toxcct24-Oct-07 1:33 
GeneralRe: question on operator * and & Pin
Nishad S24-Oct-07 1:49
Nishad S24-Oct-07 1:49 
AnswerRe: question on operator * and & Pin
toxcct24-Oct-07 0:29
toxcct24-Oct-07 0:29 
GeneralRe: question on operator * and & Pin
King Tran24-Oct-07 2:03
King Tran24-Oct-07 2:03 
GeneralRe: question on operator * and & Pin
toxcct24-Oct-07 2:06
toxcct24-Oct-07 2:06 
QuestionRun time error on my SQL database Pin
CodingLover23-Oct-07 18:21
CodingLover23-Oct-07 18:21 
Hi all,

I create a database on SQL 2005 Express edition and link it to a C++/MFC application as follows. It wont gives any compile time errors. But at run time, it gives an error. Here are details.

Link the database in OnInitDialog()

here is the code
<br />
BOOL CSRFDBDlg::OnInitDialog()<br />
{<br />
        CDatabase srfDB ;<br />
        CString srfNAME ;<br />
<br />
	srfNAME = "ODBC; DSN=.SQLEXPRESS; UID=sa; PWD=sa123; DATABASE=srfdb.mdf" ;<br />
	srfDB.Open(srfNAME) ;<br />
	if(srfDB.IsOpen())<br />
	{<br />
		AfxMessageBox("ok") ;<br />
	}<br />
<br />
	srfDB.Close() ;<br />
}<br />


Gives the following runtime error
Data source name not found and no default driver specified

Can you guys tell me where I'm going wrong....Frown | :(

I appreciate your help all the time...
ErangaSmile | :)

AnswerRe: Run time error on my SQL database Pin
chandu00423-Oct-07 21:53
chandu00423-Oct-07 21:53 
GeneralRe: Run time error on my SQL database Pin
CodingLover24-Oct-07 0:34
CodingLover24-Oct-07 0:34 
GeneralRe: Run time error on my SQL database Pin
chandu00424-Oct-07 0:41
chandu00424-Oct-07 0:41 
GeneralRe: Run time error on my SQL database Pin
CodingLover24-Oct-07 1:26
CodingLover24-Oct-07 1:26 
QuestionHow to open files with spaces? (Beginner) Pin
VistaXP23-Oct-07 18:20
VistaXP23-Oct-07 18:20 
AnswerRe: How to open files with spaces? (Beginner) Pin
Peter Weyzen23-Oct-07 19:29
Peter Weyzen23-Oct-07 19:29 
GeneralRe: How to open files with spaces? (Beginner) Pin
VistaXP23-Oct-07 19:44
VistaXP23-Oct-07 19:44 
GeneralRe: How to open files with spaces? (Beginner) Pin
David Crow24-Oct-07 3:29
David Crow24-Oct-07 3:29 
GeneralRe: How to open files with spaces? (Beginner) Pin
Peter Weyzen24-Oct-07 13:45
Peter Weyzen24-Oct-07 13:45 
QuestionPerformance issue.. Pin
Neo Andreson23-Oct-07 18:15
Neo Andreson23-Oct-07 18:15 
AnswerRe: Performance issue.. Pin
Hamid_RT23-Oct-07 21:02
Hamid_RT23-Oct-07 21:02 
AnswerRe: Performance issue.. Pin
David Crow24-Oct-07 3:39
David Crow24-Oct-07 3:39 
AnswerRe: Performance issue.. [modified] Pin
Neo Andreson24-Oct-07 4:00
Neo Andreson24-Oct-07 4:00 
QuestionHow to know the type of variable at run time?? Pin
ashishbhatt23-Oct-07 17:38
ashishbhatt23-Oct-07 17:38 
AnswerRe: How to know the type of variable at run time?? Pin
mr_Tuborg23-Oct-07 18:51
mr_Tuborg23-Oct-07 18:51 
AnswerRe: How to know the type of variable at run time?? Pin
Naveen23-Oct-07 19:43
Naveen23-Oct-07 19:43 
AnswerRe: How to know the type of variable at run time?? Pin
Mark Salsbery24-Oct-07 6:01
Mark Salsbery24-Oct-07 6:01 

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.