Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ADOX question

Re: ADOX question

From: Steffen Ramlow <s.ramlow_at_gmx.de>
Date: Mon, 21 Jan 2002 12:58:11 +0100
Message-ID: <a2gvpl$1139ib$1@ID-54600.news.dfncis.de>


stored proc in access?
how can a stored proc create an arbitrary table? show us the sp plz.

"Daniel Secci" <daniel.secci_at_kriko.com> wrote in message news:a2gser$8ic$1_at_news.magnet.ch...
> Thanks Steffen.
>
> I just used another method. I created a stored procedure with params and
> called it from the application.
>
> Regards,
> Daniel
>
> "Steffen Ramlow" <s.ramlow_at_gmx.de> schrieb im Newsbeitrag
> news:a2gpke$10uvqd$1_at_ID-54600.news.dfncis.de...
> > well - if the driver does not support this operation then it does not
> > support it. period.
> > so u need another driver or another solution
> >
> > what adox can do via an ole/db provider u can do via direct ddl too -
> maybe
> > even with the same syntax for all ur databases
> >
> > its always
> >
> > create table bla (
> > ...
> > )
> >
> > maybe ur datatypes r different, just use variables 4 em
> >
> >
> > "Daniel Secci" <daniel.secci_at_kriko.com> wrote in message
> > news:a2ghsf$62b$1_at_news.magnet.ch...
> > > Thanks Steffen.
> > >
> > > The problem is I have to write an application which works with several
> > > DBMS (mainly SQL Server / Oracle and Access). I have to dynamically
> > > create tables, that's why I use ADOX. The piece of code works with
> > > SQL Server but not with Oracle. I really have to find a way...
> > >
> > > Daniel
> > >
> > > "Steffen Ramlow" <s.ramlow_at_gmx.de> schrieb im Newsbeitrag
> > > news:a2c2j2$1070e9$1_at_ID-54600.news.dfncis.de...
> > > > not all providers must support all methods, the error says that the
> > > provider
> > > > cannot do this
> > > > u can "ask" the provider if it provides a method (dunno the calls
now)
> > > >
> > > > btw.: i would never manage DB structure via ADOX...
> > > >
> > > > better use native sql
> > > >
> > > > p.s.
> > > >
> > > > c++ is sick :-)
> > > >
> > > >
> > > > "Daniel Secci" <daniel.secci_at_kriko.com> wrote in message
> > > > news:a29h3r$b40$1_at_news.magnet.ch...
> > > > > Hi all,
> > > > >
> > > > > Did someone already manage to create a table with primary key
> > > > > using ADOX and OraOLEDB Provider ?
> > > > >
> > > > > The following code doesn't work (but does with SQL Server) and
> > > > > throws me an exception (the table is created without the PKey :
> > > > >
> > > > > --------------------------------------------
> > > > > // create new table
> > > > > TESTHR(table.CreateInstance(__uuidof(ADOX::Table)));
> > > > > table->PutName((LPCTSTR)(_bstr_t) newTable.bstrVal);
> > > > > table->Columns->Append("DATUM", ADOX::adDBTimeStamp, 0);
> > > > > table->Columns->Append("ZEIT", ADOX::adChar, 10);
> > > > > sprintf(pkName, "PK_%s", (LPCTSTR)(_bstr_t) newTable.bstrVal);
> > > > > // create new primary key
> > > > > TESTHR(key.CreateInstance(__uuidof(ADOX::Index)));
> > > > > key->Name = pkName;
> > > > > key->Columns->Append("DATUM", ADOX::adDBTimeStamp, 0);
> > > > > key->Columns->Append("ZEIT", ADOX::adChar, 10);
> > > > > key->PutPrimaryKey(-1);
> > > > > key->PutUnique(-1);
> > > > > key->PutIndexNulls(ADOX::adIndexNullsDisallow);
> > > > > table->Indexes->Append(_variant_t((IDispatch*) key));
> > > > > // add table
> > > > > catalog->Tables->Append(_variant_t((IDispatch *) table));
> > > >
> > >
> >
>
> --------------------------------------------------------------------------
> > > > >
> > > > > Exception thrown :
> > > > >
> > > >
> >
> -----------------------------------------------------------------------
> > > > > Error by adding table TAB1 : Object or provider is not capable of
> > > > performing
> > > > > requested operation.
> > > > > Error number 800a0cb3 : Unknown error 0x800A0CB3
> > > >
> >
> -----------------------------------------------------------------------
> > > > >
> > > > > Thanks,
> > > > > Daniel
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Received on Mon Jan 21 2002 - 05:58:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US