Re: About database errors by Frank
Frank
Wed Mar 03 10:54:49 CST 2004
That looks okay, but what we need to see is the block of code where you
create/open the database object and create/open/use the recordset object.
If your relying on the recordset to create your database/workspace objects
then you may not have the proper permissions in the database, if that's
enabled.
HTH
--
============
Frank Hickman
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.
"Jitesh Vira" <anonymous@discussions.microsoft.com> wrote in message
news:5d3701c4007e$ec452410$a101280a@phx.gbl...
> Respected Sir,
>
> I have written below given code:
> IMPLEMENT_DYNAMIC(CForDemoSet, CDaoRecordset)
>
> CForDemoSet::CForDemoSet(CDaoDatabase* pdb)
> : CDaoRecordset(pdb)
> {
> //{{AFX_FIELD_INIT(CForDemoSet)
> m_LevelID = 0;
> m_Level = _T("");
> m_CategaryID = 0;
> m_Categary = _T("");
> m_DialNo = _T("");
> //}}AFX_FIELD_INIT
> m_nDefaultType = dbOpenDynaset;
> }
>
> CString CForDemoSet::GetDefaultDBName()
> {
> return _T("D:\\Kanan\\Ravi
> Computer\\TAPI\\Demo.mdb");
> }
>
>
> CString CForDemoSet::GetDefaultSQL()
> {
> return _T("[Main]");
> }
>
> void CForDemoSet::DoFieldExchange(CDaoFieldExchange* pFX)
> {
> //{{AFX_FIELD_MAP(CForDemoSet)
> pFX->SetFieldType(CDaoFieldExchange::outputColumn);
> DFX_Byte(pFX, _T("[Main].[LevelID]"), m_LevelID);
> DFX_Text(pFX, _T("[Main].[Level]"), m_Level);
> DFX_Byte(pFX, _T("[Main].[CategaryID]"),
> m_CategaryID);
> DFX_Text(pFX, _T("[Main].[Categary]"), m_Categary);
> //}}AFX_FIELD_MAP
> }
>
> #ifdef _DEBUG
> void CForDemoSet::AssertValid() const
> {
> CDaoRecordset::AssertValid();
> }
>
> void CForDemoSet::Dump(CDumpContext& dc) const
> {
> CDaoRecordset::Dump(dc);
> }
> #endif //_DEBUG
>
> >-----Original Message-----
> >It would appear that your dyna set contains no field
> information. What does
> >the code block look like that you are using to open the
> dyna set?
> >
> >--
> >Frank
> >
> >"Jitehs Virani" <anonymous@discussions.microsoft.com>
> wrote in message
> >news:4f8e01c3ffee$16a446f0$a401280a@phx.gbl...
> >> Respected Sir,
> >>
> >> I am using DAO Recordset for my project and
> >> recordset type is cynasset, but when I am trying to
> access
> >> any records, I am finding 0 records as well as whenever
> I
> >> am trying to add, edit or delete records, I am getting
> an
> >> error first time when dialog is loaded in daocore.cpp
> file
> >> at line no. 4854 which contains the sentence "ASSERT
> >> (m_nFields > 0);". So where is the problem?
> >>
> >> Regards,
> >> Jitesh
> >
> >
> >.
> >