ADOX

P

Phil

Hello

I hope this is the right newsgroup for an ADOX question. My apologies if it
isn't :)

I've been looking at information at the following link:

http://support.microsoft.com/default.aspx?scid=kb;[LN];Q303814

and have tried the following in a VB.net application:

Dim cat As ADOX.Catalog
cat = New ADOX.Catalog
cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" &_
"Data Source=" & "C:\book1.xls;Extended Properties=Excel 8.0"

i.e. virtually what is given in the Microsoft example.

However, when I run this I get the error message:

"Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another."

Can anybody help?

Phil
 
C

Cor Ligthert

Phil,

Please do not multipost, you can crosspost to relevant newsgroup as much as
you want (crossposting is sending 1 message to more relevant newsgroups).

I have placed my answer
(the link for VBNet) in the newsgroup languages.vb, this link is vba/vb
classic

Cor
 
P

Phil

Will do.

Ta

Phil

Cor Ligthert said:
Phil,

Please do not multipost, you can crosspost to relevant newsgroup as much
as you want (crossposting is sending 1 message to more relevant
newsgroups).

I have placed my answer
(the link for VBNet) in the newsgroup languages.vb, this link is vba/vb
classic

Cor
 
P

Paul Clement

¤ Hello
¤
¤ I hope this is the right newsgroup for an ADOX question. My apologies if it
¤ isn't :)
¤
¤ I've been looking at information at the following link:
¤
¤ http://support.microsoft.com/default.aspx?scid=kb;[LN];Q303814
¤
¤ and have tried the following in a VB.net application:
¤
¤ Dim cat As ADOX.Catalog
¤ cat = New ADOX.Catalog
¤ cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" &_
¤ "Data Source=" & "C:\book1.xls;Extended Properties=Excel 8.0"
¤
¤ i.e. virtually what is given in the Microsoft example.
¤
¤ However, when I run this I get the error message:
¤
¤ "Arguments are of the wrong type, are out of acceptable range, or are in
¤ conflict with one another."
¤
¤ Can anybody help?

Create a Connection object and set the Catalog object's ActiveConnection to it:

Dim cnn As New ADODB.Connection
Dim cat As New ADOX.Catalog

cnn.Open("Provider=Microsoft.Jet.OLEDB.4.0;" &_
"Data Source=" & "C:\book1.xls;Extended Properties=Excel 8.0")

cat.ActiveConnection = cnn

'...
'...

cat = Nothing
cnn.Close()
cnn = Nothing

Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
G

Guest

Phil - I think that if you're developing on .NET, you have to use the
ADOMD.Net provider, which is a .NET equivalent of ADOMD...

I'm wondering, though - where's the ADOMD.Net newsgroup?
 
P

Paul Clement

¤ Hi Paul
¤
¤ I tried the same technique last week. I'm afraid it fails in .NET :(
¤
¤ Phil

Same error or a different error? I don't have any problem running the above code.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
G

Guest

Hey its Matt,

Had the same error message while coding my ASP. I dont know yoursetup there, but we realized it was a Windows XP fault. Theexact same code worked on windows 2000. We wrote an exam on thisstuff on XP, and we eventually figured out a work around on thiserror. Okay cant remember... but watch this space.....

User submitted from AEWNET (http://www.aewnet.com/)
 
N

Navarro

Hey its Matt,

Had the same error message while coding my ASP. I dont know yoursetup there, but we realized it was a Windows XP fault. Theexact same code worked on windows 2000. We wrote an exam on thisstuff on XP, and we eventually figured out a work around on thiserror. Okay cant remember... but watch this space.....
User submitted from AEWNET (http://www.aewnet.com/)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top