Click here to Skip to main content
15,921,697 members
Home / Discussions / Database
   

Database

 
GeneralToolbar and Short Keys/Cuts Pin
STW27-Apr-03 6:30
STW27-Apr-03 6:30 
GeneralQuery Help Pin
NickOne26-Apr-03 12:35
NickOne26-Apr-03 12:35 
QuestionHow to get the last inserted and updated id (primary_key) with Sql C# Pin
STW26-Apr-03 3:24
STW26-Apr-03 3:24 
AnswerRe: How to get the last inserted and updated id (primary_key) with Sql C# Pin
David Salter26-Apr-03 10:29
David Salter26-Apr-03 10:29 
GeneralRe: How to get the last inserted and updated id (primary_key) with Sql C# Pin
STW26-Apr-03 23:02
STW26-Apr-03 23:02 
GeneralRe: How to get the last inserted and updated id (primary_key) with Sql C# Pin
David Salter30-Apr-03 11:37
David Salter30-Apr-03 11:37 
AnswerRe: How to get the last inserted and updated id (primary_key) with Sql C# Pin
Chris Maunder26-Apr-03 12:42
cofounderChris Maunder26-Apr-03 12:42 
GeneralFilter and Delete Question Pin
Toni7825-Apr-03 6:54
Toni7825-Apr-03 6:54 
I am writing a database program using ADO and Visual C++.
Let me explain my problem.

// _ConnectionPtr m_pConn;
m_pConn->Open(L"Provider=Microsoft.Jet.OLEDB.4.0;
		Data Source=Inventory.mdb;",
                 L"", L"", adOpenUnspecified );
...
// _RecordsetPtr pRs
// and bstrQuery is some SQL SELECT statement
pRs->Open( _variant_t( bstrQuery ),
		vNull,
		adOpenDynamic,
		adLockOptimistic,
		adCmdUnknown );

// When I delete a record this is how I do it. Just
// an example. And it works just fine.
if( m_pRs->Supports( adDelete ) && m_nNoRows > 1 )
{
	// Delete the current record
	m_pRs->Delete( adAffectCurrent );
	m_pRs->MoveNext();
	if( m_pRs->GetADOEOF() )
		m_pRs->MovePrevious();
} // end if
//
// At some point I set a filter and I do it this way:
CString strFilter = "vField LIKE 'smth%';
m_pRs->Filter = _variant_t( (_bstr_t)strFilter );
//
After I set the filter and I delete a record, if I try to
move to the previous record (even though the record is not
the first) I get an error which suggests that the row where
I am trying to move is either marked for deletion or has
been deleted.  Why? The database supports MovePrevious and
I don't use batch mode. This problem occurs only if I
set a filter.  The filter works fine too. It selects only
the records that I want it to select.


// Afterall I realized that even my comment lines have bugs
GeneralDefault number of Decimals. Pin
Chris Meech25-Apr-03 5:58
Chris Meech25-Apr-03 5:58 
GeneralRe: Default number of Decimals. Pin
Toni7825-Apr-03 7:07
Toni7825-Apr-03 7:07 
QuestionA mostly working SP ? Pin
Mike Osbahr25-Apr-03 4:14
Mike Osbahr25-Apr-03 4:14 
AnswerRe: A mostly working SP ? Pin
perlmunger30-Apr-03 5:14
perlmunger30-Apr-03 5:14 
Generalinteresting TSQL Q Pin
User 814724-Apr-03 7:49
User 814724-Apr-03 7:49 
QuestiondBASE Technical Specification? Pin
Mark Sanders24-Apr-03 3:30
Mark Sanders24-Apr-03 3:30 
AnswerRe: dBASE Technical Specification? Pin
Anonymous24-Apr-03 7:04
Anonymous24-Apr-03 7:04 
AnswerRe: dBASE Technical Specification? Pin
David Salter24-Apr-03 22:43
David Salter24-Apr-03 22:43 
AnswerRe: dBASE Technical Specification? Pin
STW27-Apr-03 10:44
STW27-Apr-03 10:44 
GeneralConnection Pooling Problem Pin
John Honan24-Apr-03 2:15
John Honan24-Apr-03 2:15 
GeneralRe: Connection Pooling Problem Pin
John Honan24-Apr-03 8:14
John Honan24-Apr-03 8:14 
GeneralMSAccess Column Format property Pin
KalliMan23-Apr-03 4:09
KalliMan23-Apr-03 4:09 
GeneralODBC support in Visual Studio.net 2003 Pin
aaronflaugh22-Apr-03 10:56
aaronflaugh22-Apr-03 10:56 
GeneralRe: ODBC support in Visual Studio.net 2003 Pin
jscroft25-Apr-03 17:10
jscroft25-Apr-03 17:10 
GeneralProblem with Master Detail Pin
Anonymous22-Apr-03 8:57
Anonymous22-Apr-03 8:57 
GeneralUsing mySQL Pin
BadJerry22-Apr-03 7:25
BadJerry22-Apr-03 7:25 
GeneralRe: Using mySQL Pin
Anonymous24-Apr-03 7:06
Anonymous24-Apr-03 7:06 

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.