Click here to Skip to main content
15,903,724 members
Home / Discussions / Database
   

Database

 
GeneralSql Error Pin
nacp8-Nov-04 23:24
nacp8-Nov-04 23:24 
GeneralRe: Sql Error Pin
David Salter8-Nov-04 23:26
David Salter8-Nov-04 23:26 
GeneralRe: Sql Error Pin
Mekong River9-Nov-04 14:32
Mekong River9-Nov-04 14:32 
QuestionPrecision and Scale ? Pin
0v3rloader8-Nov-04 4:32
0v3rloader8-Nov-04 4:32 
AnswerRe: Precision and Scale ? Pin
Richard Deeming8-Nov-04 4:45
mveRichard Deeming8-Nov-04 4:45 
GeneralSQLite Pin
Steve S8-Nov-04 0:46
Steve S8-Nov-04 0:46 
GeneralSQL Server Management API Pin
Its due when7-Nov-04 18:33
Its due when7-Nov-04 18:33 
GeneralTrouble in updating source in ADO Pin
wicked_guy7-Nov-04 2:13
wicked_guy7-Nov-04 2:13 
Hi everone,

I am having trouble in updating the source database. I am using a dialog based application with a datagrid. I managed to add a number (01065017) to the first coloumn succesfully but could not update the source after the addition of this number. Any Idea why.
The following is the code:

m_pConn.CreateInstance(__uuidof(Connection));
m_pConn->Open("Provider=Microsoft.Jet.OLEDB.4.0;"
"Data Source=ADOTestDB.MDB",
_bstr_t (""),
_bstr_t (""),
adModeUnknown );

m_pComm.CreateInstance(__uuidof(Command));
m_pComm->ActiveConnection = m_pConn;
m_pComm->CommandText = "Select * From Student";

m_pReco.CreateInstance(__uuidof(Recordset));
m_pReco->CursorLocation = adUseClient;
m_pReco->Open ( (IDispatch *) m_pComm, vtMissing, adOpenStatic,
adLockBatchOptimistic, adCmdUnknown);

m_DataCtrl.SetCaption("Students");
m_DataCtrl.SetRefDataSource(NULL);
m_DataCtrl.SetRefDataSource((LPUNKNOWN) m_pReco);
m_DataCtrl.Refresh();

m_pReco->AddNew();

FieldsPtr pFields = m_pReco->Fields;
FieldPtr pStudentNo = pFields->GetItem("StudentNo");
ASSERT(NULL != pStudentNo);

CString ali = (char*)(_bstr_t) pStudentNo->Value;
ali.Format("01065017");

_variant_t vColumn, vValue;

vColumn.SetString("StudentNo");
vValue.SetString(ali);

m_pReco->Update(vColumn, vValue);
m_pReco->Update();


Thanx in advance
GeneralFrom one database to another (DataSets & .NET) Pin
Jon Rista5-Nov-04 9:28
Jon Rista5-Nov-04 9:28 
QuestionUrgent!!--Layer Isolation using ArrayList?? Pin
obymathew4-Nov-04 23:48
obymathew4-Nov-04 23:48 
AnswerRe: Urgent!!--Layer Isolation using ArrayList?? Pin
Daniel Turini9-Nov-04 0:47
Daniel Turini9-Nov-04 0:47 
GeneralWorking with just time section of a datetime type Pin
Den2Fly4-Nov-04 21:56
Den2Fly4-Nov-04 21:56 
GeneralRe: Working with just time section of a datetime type Pin
Colin Angus Mackay4-Nov-04 22:14
Colin Angus Mackay4-Nov-04 22:14 
GeneralRe: Working with just time section of a datetime type Pin
Den2Fly7-Nov-04 1:45
Den2Fly7-Nov-04 1:45 
GeneralRe: Working with just time section of a datetime type Pin
Colin Angus Mackay7-Nov-04 1:53
Colin Angus Mackay7-Nov-04 1:53 
GeneralRe: Working with just time section of a datetime type Pin
Grimolfr5-Nov-04 9:39
Grimolfr5-Nov-04 9:39 
GeneralRe: Working with just time section of a datetime type Pin
Jon Rista5-Nov-04 10:53
Jon Rista5-Nov-04 10:53 
GeneralRe: Working with just time section of a datetime type Pin
Den2Fly7-Nov-04 1:48
Den2Fly7-Nov-04 1:48 
GeneralRe: Working with just time section of a datetime type Pin
Grimolfr7-Nov-04 4:51
Grimolfr7-Nov-04 4:51 
GeneralRe: Working with just time section of a datetime type Pin
Den2Fly7-Nov-04 20:02
Den2Fly7-Nov-04 20:02 
GeneralNsted SELECT statements Pin
Den2Fly4-Nov-04 12:02
Den2Fly4-Nov-04 12:02 
GeneralRe: Nsted SELECT statements Pin
Christian Graus4-Nov-04 12:17
protectorChristian Graus4-Nov-04 12:17 
GeneralRe: Nsted SELECT statements Pin
Den2Fly4-Nov-04 21:20
Den2Fly4-Nov-04 21:20 
GeneralRe: Nsted SELECT statements Pin
Christian Graus4-Nov-04 21:23
protectorChristian Graus4-Nov-04 21:23 
GeneralRe: Nsted SELECT statements Pin
Colin Angus Mackay4-Nov-04 22:11
Colin Angus Mackay4-Nov-04 22:11 

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.