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

C / C++ / MFC

 
QuestionApplication Error... Pin
Priya_Sundar3-Dec-07 18:40
Priya_Sundar3-Dec-07 18:40 
GeneralRe: Application Error... Pin
john56323-Dec-07 18:45
john56323-Dec-07 18:45 
GeneralRe: Application Error... Pin
Hamid_RT3-Dec-07 19:40
Hamid_RT3-Dec-07 19:40 
GeneralRe: Application Error... Pin
Jijo.Raj4-Dec-07 2:23
Jijo.Raj4-Dec-07 2:23 
GeneralRe: Application Error... Pin
David Crow4-Dec-07 7:19
David Crow4-Dec-07 7:19 
GeneralIncorrect position in screen Pin
kk.tvm3-Dec-07 18:29
kk.tvm3-Dec-07 18:29 
GeneralRe: Incorrect position in screen Pin
Nelek4-Dec-07 21:40
protectorNelek4-Dec-07 21:40 
GeneralExecute inline query with database connection in C++ Pin
CodingLover3-Dec-07 18:11
CodingLover3-Dec-07 18:11 
Hi all,

I have create database connection in my application and use it in several locations. That mean I'm using more that one tables with same connection. What I have done is execute separate queries with same connection.

But now I have a question. One of my table have large number of columns. So i write separate query as follows, actually a database function.

<br />
public bool DataToDB(int GroupID, int SessionID, int PartID, int DestinationList, int MemberID, int DataMessage, int ServiceID, int ActivityID, int Bio_Size, image Bio_Data)<br />
{<br />
<br />
	string sqlCommand =<br />
		"INSERT INTO RecordData (GroupId, SessionID, PartID, DestinationList, MemberID, DataMessage, ServiceID, ActivityID, Bio_Size, Bio_Data) <br />
		VALUES (@GroupId, @SessionID, @PartID, @DestinationList, @MemberID, @DataMessage, @ServiceID, @ActivityID, @Bio_Size, @Bio_Data)";<br />
	Database db = DatabaseFactory.CreateDatabase();<br />
	db.AddInParameter(dbCommand, "GroupId", DbType.Int32, GroupId);<br />
	db.AddInParameter(dbCommand, "SessionID", DbType.Int32, SessionID);<br />
	db.AddInParameter(dbCommand, "PartID", DbType.Int32, PartID);<br />
	db.AddInParameter(dbCommand, "DestinationList", DbType.Int32, DestinationList);<br />
	db.AddInParameter(dbCommand, "MemberID", DbType.Int32, MemberID);<br />
	db.AddInParameter(dbCommand, "DataMessage", DbType.Int32, DataMessage);<br />
	db.AddInParameter(dbCommand, "ServiceID", DbType.Int32, ServiceID);<br />
	db.AddInParameter(dbCommand, "ActivityID", DbType.Int32, ActivityID);<br />
	db.AddInParameter(dbCommand, "Bio_Size", DbType.Int32, Bio_Size);<br />
	db.AddInParameter(dbCommand, "Bio_Data", DbType.image, Bio_Data);<br />
	db.ExecuteNonQuery(dbCommand);<br />
<br />
}<br />


If you want I'll put my code/function related to this function on another post. My question is that how to use this on my C++ application. Any easy way to do it.
GeneralRe: Execute inline query with database connection in C++ Pin
wira1guys3-Dec-07 20:38
wira1guys3-Dec-07 20:38 
GeneralRe: Execute inline query with database connection in C++ Pin
CodingLover4-Dec-07 18:30
CodingLover4-Dec-07 18:30 
GeneralRe: Execute inline query with database connection in C++ Pin
wira1guys4-Dec-07 20:07
wira1guys4-Dec-07 20:07 
QuestionHow can i access my fat table of hard drive through codding Pin
Naveed7273-Dec-07 17:58
Naveed7273-Dec-07 17:58 
AnswerRe: How can i access my fat table of hard drive through codding Pin
Naveed7273-Dec-07 19:50
Naveed7273-Dec-07 19:50 
GeneralRe: How can i access my fat table of hard drive through codding Pin
JudyL_MD4-Dec-07 5:01
JudyL_MD4-Dec-07 5:01 
GeneralRe: How can i access my fat table of hard drive through codding Pin
David Crow4-Dec-07 7:25
David Crow4-Dec-07 7:25 
GeneralRe: How can i access my fat table of hard drive through codding [modified] Pin
JudyL_MD4-Dec-07 9:22
JudyL_MD4-Dec-07 9:22 
GeneralRe: How can i access my fat table of hard drive through codding Pin
Nelek4-Dec-07 21:30
protectorNelek4-Dec-07 21:30 
GeneralError LNK2019 Pin
wira1guys3-Dec-07 17:40
wira1guys3-Dec-07 17:40 
QuestionRe: Error LNK2019 Pin
Hamid_RT3-Dec-07 19:39
Hamid_RT3-Dec-07 19:39 
GeneralRe: Error LNK2019 Pin
wira1guys3-Dec-07 20:26
wira1guys3-Dec-07 20:26 
QuestionRe: Error LNK2019 Pin
David Crow4-Dec-07 7:27
David Crow4-Dec-07 7:27 
GeneralRe: Error LNK2019 Pin
wira1guys4-Dec-07 19:49
wira1guys4-Dec-07 19:49 
QuestionHow to Use libpng? Pin
manish.patel3-Dec-07 17:37
manish.patel3-Dec-07 17:37 
AnswerRe: How to Use libpng? Pin
Hamid_RT3-Dec-07 19:37
Hamid_RT3-Dec-07 19:37 
GeneralMoveWindow() Pin
Oliver1233-Dec-07 16:25
Oliver1233-Dec-07 16:25 

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.