Click here to Skip to main content
15,558,795 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Can we access session cookies from C++/VC++ code? [modified] Pin
sarat16-Sep-09 7:54
sarat16-Sep-09 7:54 
QuestionRe: Can we access session cookies from C++/VC++ code? Pin
David Crow16-Sep-09 7:59
David Crow16-Sep-09 7:59 
AnswerRe: Can we access session cookies from C++/VC++ code? Pin
sarat16-Sep-09 9:16
sarat16-Sep-09 9:16 
GeneralRe: Can we access session cookies from C++/VC++ code? Pin
David Crow16-Sep-09 9:19
David Crow16-Sep-09 9:19 
GeneralRe: Can we access session cookies from C++/VC++ code? Pin
sarat23-Sep-09 0:52
sarat23-Sep-09 0:52 
GeneralRe: Can we access session cookies from C++/VC++ code? Pin
David Crow23-Sep-09 3:53
David Crow23-Sep-09 3:53 
GeneralRe: Can we access session cookies from C++/VC++ code? Pin
sarat23-Sep-09 21:43
sarat23-Sep-09 21:43 
QuestionODBC- too long text trnasmition problem Pin
Rafix11114-Sep-09 3:57
Rafix11114-Sep-09 3:57 
My class which cooperates with MS Acces base looks like below:
In doted place I removed code as a not relevant for case:
Problem is that field mTekst in Acces is set as Memo type. And I wish
to place long report texts in.
My class can't transfer longer text then 255 chars otherwise it shows
an error. Temporarily I deal with it by cutting part of chars.
(Look in function LeftF()) . But a program is not functionally then.
What can I do to deal with problem? Help

1. IMPLEMENT_DYNAMIC(mRec, CRecordset)
2.
3. mRec::mRec(CDatabase* pdb): CRecordset(pdb)
4. {
5. //{{AFX_FIELD_INIT(mRec)
6. // ......
7. m_Temat = _T(""); //
8. // ........
9. //}}AFX_FIELD_INIT
10. m_nDefaultType = snapshot;
11. }
12.
13.
14. CString mRec::GetDefaultConnect()
15. {
16. return _T("ODBC;DSN=mbasa"); // mbasa it is my base in MS
17. Acces
18. }
19.
20. CString mRec::GetDefaultSQL()
21. {
22. return _T("[mHeapTb]"); // mHeapTB it is my table in in
23. my base
24. }
25.
26. void mRec::DoFieldExchange(CFieldExchange* pFX)
27. {
28. //{{AFX_FIELD_MAP(mRec)
29. pFX->SetFieldType(CFieldExchange::outputColumn);
30. ..........
31. RFX_Text(pFX, _T("[mTekst]"), m_mTekst); //mTekst it is
32. field in Table
33. ...........
34. //}}AFX_FIELD_MAP
35. }
36.
37. // Here are my functions
38.
39. CString mRec::GetmTekst(int i)
40. {
41. InterriroF(i);
42.
43. return m_mTekst;
44. }
45. //.................................
46.
47. void mRec::InterriroF(int i)
48. {
49. if(Open(AFX_DB_USE_DEFAULT_TYPE,"SELECT * FROM mHeapTb",readOnly))
50. {
51. try
52. {
53. SetAbsPos (i);
54. }
55. catch(CDBException * e)
56. {
57. LeftF();
58. e->Delete();
59.
60.}
61. Close() ;
62. }
63. }
64.
65. //................
66.
67.
68. void mRec::SetTekst(CString mTxt,int i)
69. {
70. if(Open(AFX_DB_USE_DEFAULT_TYPE,"SELECT * FROM mHeapTb",none))
71. {
72. SetAbsPos(i);
73. Edit();
74. if(mTxt.GetLength()>255)
75. mTxt=mTxt.Left(255);
76. mTxt=mTxt;
77. Update();
78. Close();
79. }
80. }
81. //........................
82.
83.
84. void mRec::SetAbsPos(int i)
85. {
86. try
87. {
88. SetAbsolutePosition (i);
89. }
90. catch(CDBException * e)
91. {
92. LeftF();
93. e->Delete();
94. }
95. }
96.
97. void mRec::LeftF()
98. {
99. if (m_mTekst.GetLength()>255)
100. m_mTekst= m_mTekst.Left(255);
101.
102. }
AnswerRe: ODBC- too long text trnasmition problem Pin
David Crow14-Sep-09 5:26
David Crow14-Sep-09 5:26 
GeneralRe: ODBC- too long text trnasmition problem Pin
Rafix11114-Sep-09 8:23
Rafix11114-Sep-09 8:23 
GeneralRe: ODBC- too long text trnasmition problem Pin
David Crow14-Sep-09 8:30
David Crow14-Sep-09 8:30 
GeneralRe: ODBC- too long text trnasmition problem Pin
Rafix11114-Sep-09 10:35
Rafix11114-Sep-09 10:35 
QuestionSet property of folder? Pin
Arrin14-Sep-09 2:58
Arrin14-Sep-09 2:58 
AnswerRe: Set property of folder? Pin
Iain Clarke, Warrior Programmer14-Sep-09 3:23
Iain Clarke, Warrior Programmer14-Sep-09 3:23 
GeneralRe: Set property of folder? Pin
Arrin14-Sep-09 4:00
Arrin14-Sep-09 4:00 
GeneralRe: Set property of folder? Pin
Iain Clarke, Warrior Programmer14-Sep-09 4:20
Iain Clarke, Warrior Programmer14-Sep-09 4:20 
Questionvsnprintf() Pin
shriniwas198514-Sep-09 2:52
shriniwas198514-Sep-09 2:52 
AnswerRe: vsnprintf() Pin
David Crow14-Sep-09 4:35
David Crow14-Sep-09 4:35 
GeneralRe: vsnprintf() Pin
shriniwas198514-Sep-09 5:40
shriniwas198514-Sep-09 5:40 
GeneralRe: vsnprintf() Pin
norish14-Sep-09 8:32
norish14-Sep-09 8:32 
AnswerRe: vsnprintf() Pin
Joe Woodbury14-Sep-09 9:08
professionalJoe Woodbury14-Sep-09 9:08 
AnswerRe: vsnprintf() Pin
Member 419459314-Sep-09 10:07
Member 419459314-Sep-09 10:07 
QuestionI have to insert value into table at runtime ? Pin
jadhavjitendrar14-Sep-09 1:26
jadhavjitendrar14-Sep-09 1:26 
AnswerRe: I have to insert value into table at runtime ? Pin
«_Superman_»14-Sep-09 1:44
professional«_Superman_»14-Sep-09 1:44 
GeneralRe: I have to insert value into table at runtime ? Pin
jadhavjitendrar14-Sep-09 1:48
jadhavjitendrar14-Sep-09 1:48 

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.