Originally posted by: raj
How can i access the Lotus 123 page from DAO classes. I have tried to open. The code is enabling me to open the database but the table name is giving me exceptions. Any Help?
thanks
raj
Originally posted by: Ling
Is possible, using cdaodatabase's SQL Execute function,
importing data from a text file to a table in *.mdb file?
Originally posted by: Paul
How can I create a excel speedsheet?
Originally posted by: Xie Feng
I'am a chinese youngman , I seen the sample code.
It's vey useful for me .but i have some question.
1.How to create a foxpro 2.6 CDaoRecordset with dbOpenTable?
2.How to seek and modify a foxpro 2.6 record with Dao?
Can you help me?
Thank you!
Yours sincerely.
Xie Feng
Originally posted by: Michael Uchitelev
}
Good luck,
Yes. Using DAO enyone can create database another than
MS Access. Here is represented code that allow you to
create any database format:
void CDDEDLGDB::OnCreate()
{
// TODO: Add your control notification handler code here
UpdateData();
CString m_hDatabase;
/* AfxGetConnect returns m_hDatabase = m_hTable (this is correct for FoxPro and Paradox databases),
m_hConnect which
equal to "FoxPro 2.6" or something else... if you need
in details let me know */
AfxGetConnect(m_hDBPath, m_hDatabase, m_hConnect, m_hTable);
// Close previous database if it was opened
if (m_pDB) m_pDB->Close();
// Otherwise create new
else
m_pDB = new CDaoDatabase;
// Check for MS Access database
if (m_hConnect == ";")
{
try
{
m_pDB->Create(m_hTable);
}
catch(...)
{
m_pDB->Close();
delete m_pDB;
m_pDB = NULL;
return;
}
else
{
try
/* This trick: First of all open database with connect string*/
{
m_pDB->Open(m_hDatabase, TRUE, FALSE, m_hConnect);
}
catch(...)
{
m_pDB->Close();
delete m_pDB;
m_pDB = NULL;
return;
}
}
/* if you could open database, open connection indeed,
you can try to create table
*/
CDaoTableDef td(m_pDB);
try
{
td.Create(m_hTable, 0, NULL, m_hConnect);
}
catch(...)
{
}
td.CreateField("HighByte", dbByte, 0);
td.CreateField("LowByte", dbByte, 0);
try
{
td.Append();
}
catch(...)
{
}
td.Close();
...
Michael.
P.S. Let me know if you could not create another database
than MS Access using DAO.
Originally posted by: Kurtis Oliverson
CDaoDatabase ddb;
On the Edit call, I get the message, "Can't update. Database or object is read-only." Notice
in the ddb.Open call that I AM opening it in read-write mode. I've tried it with "FoxPro 2.6;" in
the SQL parameter too--same results.
Here's my code:
ddb.Open(".",FALSE,FALSE,"FoxPro 3.0;");
CDaoTableDef dtd(&ddb);
dtd.Open("Test");
CDaoRecordset drs(&ddb);
drs.Open(&dtd);
...
drs.Edit();
...
Originally posted by: Stephen Perry
How can I use this to access an Oracle database? Is it possible?
ReplyOriginally posted by: Gang WU
What is the connect string used to open Visual FoxFro database or/and table?
ReplyOriginally posted by: Jack Lennox
I want to use your article to set the foundation for being able to read a dBase IV database file. I am confused about how index files fit into the scheme of things. I have both the .dbf file and the .mdx index file. How do I establish the index that is to be used when I open the .dbf file?
Thanks,
Jack
Originally posted by: lior
Is there a way to use DAO to read sources from Oracle?
Reply