|
-
Jul 16th, 2008, 12:10 PM
#1
Thread Starter
New Member
VB6 not recognizing OLEDbCommand
I'm trying to use the command object 'OLEDbCommand' but each time I type in the syntax I get the error 'User-defined type not defined'
Can someone tell my why VB is doing this? Do I need to add a componet and if so which one?
Here's the syntax I'm using:
Dim cmd As New OleDbCammand(InsertString, OleConn).
-
Jul 16th, 2008, 12:13 PM
#2
Re: VB6 not recognizing OLEDbCommand
OLEDbCommand is part of .Net, so is not supported by VB6 - instead you should be using an ADODB.Command
To be able to use it you need a reference to "Microsoft ActiveX Data Objects Library X.X", and the kind of code shown in "method 3" of the article How can I add a record to a database? from our Database Development FAQs/Tutorials (at the top of the Database Development forum)
-
Jul 16th, 2008, 03:46 PM
#3
Thread Starter
New Member
Re: VB6 not recognizing OLEDbCommand
That would explain it. Thanks for you help...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|