OLEDB (.NET) and VB-Macros

  • Thread starter Thread starter D. Kampschulte
  • Start date Start date
D

D. Kampschulte

Hello,

I've got a problem with an ACCESS-DB (2002) using VB-Macros in it's own
views.

Example:
There's a view 'v_test' like this:
SELECT COUNT(*), aFunction() FROM t_test;

aFunction is a VB-function defined inside a module.

Using "SELECT * FROM v_test" inside MS-Acces works fine.
Respond:
Expr1000|Expr1001
0| 87


Using "SELECT * FROM v_test" with C# (.Net 1.1, 2.0; OLEDB) I get the
message:

"Undefinierte Funktion 'aFunction' in Ausdruck."

In english (nearly... ;-> ):"Undefined function 'aFunction' in select."

How can I use Views using VBA-functions from "outside" (OLE-DB,
ODBC-driver) MS-ACCESS? - Any suggestions...?!

Thanks for info and sorry for my english...

CU DK
 
Sorry, you can't use views which include user-defined functions from
"outside" Access.

When you're running from outside of Access, you're strictly interacting with
Jet, which doesn't know anything about user-defined functions.
 
Hello,

and thanks for the quick respond. I nearly expected this kind of answer...

There's no possibility "hiding" this kind of functions inside of some
kind of "stored procedures" which are Jet'able?

CU DK
 
No way that I've ever found.

If Access is installed on the client, you might be able to use Automation to
actually run the query in Access, but that strikes me as a lot of overhead.
 
Hello,

no! This is(== would be) OK. The Access-DB is some kind of
"mostMostlyMostPeaceOfSh*t" created from/with a client of mine who now
wants to convert it to a real APPLICATION.

There are really many hours of work burried inside this DB so it may
cost some $'s to migrate it.

I think this is the only way to migrate(port?!) the views... :(

"Wie schade!" (german for "What a shame!") - I'll have much to do to
convert the data/chunk-proggies... :(

THNX "trotzdem" (anyway)!

This was "online-help"... :D

CU DK
 
Moin, moin!

Do you know how do use an (Access-) Query with parameters with
Office-Automation? - (Use VBA-/VB-/C#-code or anything else you know...

Give me an Example please... ;->

THNX the next time

CU DK
 
Sorry, I don't have a good example handy (and there's nothing in Rick
Dobson's "Programming Microsoft Visual Basic.Net For Microsoft Access
Databases" that I can see).

See whether there's anything useful in

How to Use Automation to Print Microsoft Access Reports
http://support.microsoft.com/?id=210132
Using Microsoft Access as an Automation Server
http://support.microsoft.com/?id=210111

(Don't worry that those KB articles refer to Access 2000: it's the same for
all versions)
 
Back
Top