What is ADOX , [Newbie]

What is ADOX , [Newbie]

Post by Gabriel Lange » Sat, 27 May 2000 04:00:00



What is ADOX , and how can it be added to the system?

Thanks,

Gaby

 
 
 

What is ADOX , [Newbie]

Post by Paul Littl » Sat, 27 May 2000 04:00:00


ADOX = Microsoft ActiveX Data Objects Extensions for Data Definition
Language and Security

It became available with ADO 2.1.  To download ADO 2.1 or the latest (2.5)
go to www.microsoft.com/data

HTH, Paul
--
Paul Little, Senior Programmer/Analyst
SVi Retail Systems
San Diego, CA


Quote:> What is ADOX , and how can it be added to the system?

> Thanks,

> Gaby


 
 
 

What is ADOX , [Newbie]

Post by Todd McDermi » Tue, 30 May 2000 04:00:00


Where can I get the ADOX docs?  I found them in the MSDN Online library, but
I'd rather download the CHM to work offline...


> ADOX = Microsoft ActiveX Data Objects Extensions for Data Definition
> Language and Security

> It became available with ADO 2.1.  To download ADO 2.1 or the latest (2.5)
> go to www.microsoft.com/data

> HTH, Paul
> --
> Paul Little, Senior Programmer/Analyst
> SVi Retail Systems
> San Diego, CA



> > What is ADOX , and how can it be added to the system?

> > Thanks,

> > Gaby

  mcdermid.vcf
< 1K Download
 
 
 

What is ADOX , [Newbie]

Post by Paul Littl » Wed, 31 May 2000 04:00:00


Go to http://msdn.microsoft.com/downloads/sdks/platform/database.asp and run
the SDK setup which should give you the documentation you need.
--
Paul Little, Senior Programmer/Analyst
SVi Retail Systems
San Diego, CA


Quote:> Where can I get the ADOX docs?  I found them in the MSDN Online library,
but
> I'd rather download the CHM to work offline...

 
 
 

1. I am creating a new query using ADOX and no matter

I am creating a new query using ADOX and no matter
what I do I cannot see the query in the Database window.
I have even pasted the example from the MSDN and change code.
What am I doing wrong ?

//Maybe:
m_pCatalog->Procedures->Append("MyProcedure", _variant_t((IDispatch
*)m_pCommand));

but no matter.

Command and CommandText Properties Example (VC++)
The following code demonstrates how to use the Command property to
update the text of a procedure.
// BeginCommandTextCpp
#import "c:\Program Files\Common Files\system\ado\msadox.dll" \
no_namespace
#import "c:\Program Files\Common Files\system\ado\msado15.dll"

#include "iostream.h"
#include "stdio.h"
#include "conio.h"

//Function declarations
inline void TESTHR(HRESULT x) {if FAILED(x) _com_issue_error(x);};
void ProcedureTextX(void);

//////////////////////////////////////////////////////////
// //
// Main Function //
// //
//////////////////////////////////////////////////////////
void main()
{
if(FAILED(::CoInitialize(NULL)))
return;

ProcedureTextX();

::CoUninitialize();

//////////////////////////////////////////////////////////
// //
// ProcedureTextX Function //
// //
//////////////////////////////////////////////////////////
void ProcedureTextX()
{
HRESULT hr = S_OK;

// Define ADOX object pointers.
// Initialize pointers on define.
// These are in the ADOX:: namespace.
_CatalogPtr m_pCatalog = NULL;

// Define ADODB object pointers.
ADODB::_ConnectionPtr m_pCnn = NULL;
ADODB::_CommandPtr m_pCommand = NULL;

try
{
//Open the Connection
TESTHR(hr = m_pCnn.CreateInstance(__uuidof(ADODB::Connection)));
TESTHR(hr = m_pCatalog.CreateInstance(__uuidof(Catalog)));
TESTHR(hr = m_pCommand.CreateInstance(__uuidof(ADODB::Command)));
m_pCnn->Open("Provider=Microsoft.Jet.OLEDB.4.0;"
"data source=c:\\Program Files\\Microsoft Office"
"\\Office\\Samples\\Northwind.mdb;","","",NULL);

//Open the catalog
m_pCatalog->PutActiveConnection(_variant_t((IDispatch *)m_pCnn));

//Get the Command
m_pCommand = m_pCatalog->Procedures->GetItem("CustomerById")->GetCommand();

//Update the CommandText
m_pCommand->PutCommandText("PARAMETERS [CustId] Text;select "
"CustomerId, CompanyName, ContactName "
"from Customers where CustomerId = [CustId]");

//Update the Procedure
m_pCatalog->Procedures->GetItem("CustomerById")->PutCommand(
_variant_t((IDispatch *)m_pCommand));

catch(_com_error &e)
{
// Notify the user of errors if any.
_bstr_t bstrSource(e.Source());
_bstr_t bstrDescription(e.Description());

printf("\n\tSource : %s \n\tdescription : %s \n
",(LPCSTR)bstrSource,(LPCSTR)bstrDescription);

catch(...)
{
cout << "Error occured in include files...."<< endl;

Thanks in anticipation.

2. Bug- DataSource property and VB6- looking for confirmation

3. Newbie: ADOX Tables.Delete gives Table In Use

4. Running RAC across dark fibre connection

5. Hi,I am newbie,and want to find solution in NT 4.0 with samba

6. How to setup my Oracle db in parallel query mode ?

7. HI,I am newbie,and want to find solution between NT 4.0 and samba

8. Preview Window

9. newbie - Am I barking up the wrong tree?

10. Newbie - am I forced to buy SQL Server?

11. Newbie Question: I am trying to Change the sourcefile name of an ftp task

12. HI,I am newbie,and want to find solution between NT 4.0 and samba