Microsoft Access COM server

Hi all,

Im writing a COM server for Microsoft Access.

AnsiString FileName = "C:\db1.mdb";
wchar_t *pwstr = new wchar_t[FileName.WideCharBufSize()];
FileName.WideChar(pwstr, FileName.WideCharBufSize());
AccessApplication1->Visible = true;
AccessApplication1->OpenCurrentDatabase(pwstr, true);
AccessApplication1->DoCmd->OpenTable("Street Name",acViewNormal,acReadOnly);

/*
Here I need to populate a ComboBox with all the records in the table "Street Name. I just cant figure out how to do it. Any ideas?
*/

AccessApplication1->CloseCurrentDatabase();
delete [] pwstr;
pwstr = NULL;

Comments

  • [code]
    : /*
    : Here I need to populate a ComboBox with all the records in the table "Street Name. I just cant figure out how to do it. Any ideas?
    : */
    [/code]

    Is the problem either reading the records from the table or putting those records into the ComboBox? I can't help you on the first, the latter is easy:

    [code]
    const String myRecord = somethingWithTable();
    ComboBox1->Items->Add(myRecord);
    [/code]

    Good luck,
    bilderbikkel

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion