Re: default constraint

From: Patty O'Dors (PattyODors_at_discussions.microsoft.com)
Date: 08/11/04


Date: Wed, 11 Aug 2004 04:25:01 -0700


> That's true. So it was imprecise of me to imply that the problem was solely
> with ADOX. But the end result is the same - the combination of ADOX and the
> SQL OLEDB provider just do not seem to provide the functionality that you
> are looking for.

It may be the case that using ODBC instead of OLEDB will enable it to gain
the information about the column properties. I'll try it.

> This does not come as a big surprise to me, as I believe
> (though this is speculation on my part) that the main purpose of ADOX was to
> encourage developers working with Jet databases to use ADO rather than DAO.
> SQL Server developers were not, in my opinion, the main target of ADOX.
> Unless someone else has another suggestion, then as far as I can see the
> only workaround is to not use ADOX. SQL DMO may be an alternative

SQL DMO would be great - but it doesn't work with Jet at all.

> , but as I
> indicated earlier, I do not have as much experience with SQL Server as with
> Jet, and it would be better if someone with more SQL Server experience could
> advise you on that issue.
>
> --
> Brendan Reynolds (MVP)
> http://brenreyn.blogspot.com
>
> The spammers and script-kiddies have succeeded in making it impossible for
> me to use a real e-mail address in public newsgroups. E-mail replies to
> this post will be deleted without being read. Any e-mail claiming to be
> from brenreyn at indigo dot ie that is not digitally signed by me with a
> GlobalSign digital certificate is a forgery and should be deleted without
> being read. Follow-up questions should in general be posted to the
> newsgroup, but if you have a good reason to send me e-mail, you'll find
> a useable e-mail address at the URL above.
>
>
> "Patty O'Dors" <PattyODors@discussions.microsoft.com> wrote in message
> news:6674D4BA-1306-439C-AA07-4DCD09161367@microsoft.com...
> > It seems like the exact same VB code works for Jet, so it must be
> something
> > to do with the fact that the SQLOLEDB provider cannot provide that
> > information, but the Jet one can.
> >
> >
> > "Brendan Reynolds" wrote:
> >
> > > It is not within my power to fix ADOX.
> > > --
> > > Brendan Reynolds (MVP)
> > > http://brenreyn.blogspot.com
> > >
> > > The spammers and script-kiddies have succeeded in making it impossible
> for
> > > me to use a real e-mail address in public newsgroups. E-mail replies to
> > > this post will be deleted without being read. Any e-mail claiming to be
> > > from brenreyn at indigo dot ie that is not digitally signed by me with a
> > > GlobalSign digital certificate is a forgery and should be deleted
> without
> > > being read. Follow-up questions should in general be posted to the
> > > newsgroup, but if you have a good reason to send me e-mail, you'll find
> > > a useable e-mail address at the URL above.
> > >
> > >
> > > "Patty O'Dors" <PattyODors@discussions.microsoft.com> wrote in message
> > > news:936CA6A9-43DA-47F6-A008-A4949FA89FCE@microsoft.com...
> > > > > I can reproduce that.
> > > >
> > > > Well done...
> > > > Can you *solve* it? or suggest a workaround?
> > > >
> > > > > The code will run without error if I print just the
> > > > > Name of the property, but fails on any attempt to print the Value.
> > > > >
> > > > > I can understand why you would prefer to use one technology for both
> > > data
> > > > > sources, but I suspect this may not be possible. I suspect you may
> need
> > > to
> > > > > use one technology (SQLDMO, perhaps?) to work with the SQL Server
> tables
> > > and
> > > > > another (I recommend DAO) to work with the Jet tables.
> > > > >
> > > > > Here's my test code, fails with error 3251 if the commented line is
> > > > > uncommented. I used 'On Error Resume Next' to resume testing the
> next
> > > > > property after an error, confirming that the error occurs with all
> > > > > properties.
> > > > >
> > > > > Public Sub ListSqlProps()
> > > > >
> > > > > Dim cnn As ADODB.Connection
> > > > > Dim cat As ADOX.Catalog
> > > > > Dim tbl As ADOX.Table
> > > > > Dim col As ADOX.Column
> > > > > Dim prp As ADOX.Property
> > > > >
> > > > > On Error GoTo ErrorHandler
> > > > > Set cnn = New ADODB.Connection
> > > > > cnn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
> > > Security
> > > > > Info=False;Initial Catalog=pubs;Data Source=(local)"
> > > > > Set cat = New ADOX.Catalog
> > > > > cat.ActiveConnection = cnn
> > > > > Set tbl = cat.Tables("authors")
> > > > > Set col = tbl.Columns(0)
> > > > > For Each prp In col.Properties
> > > > > Debug.Print prp.Name
> > > > > 'Debug.Print CStr(prp.Value)
> > > > > Next prp
> > > > >
> > > > > ExitProcedure:
> > > > > On Error Resume Next
> > > > > cnn.Close
> > > > > Exit Sub
> > > > >
> > > > > ErrorHandler:
> > > > > MsgBox "Error " & Err.Number & ": " & Err.Description
> > > > > Resume Next
> > > > >
> > > > > End Sub
> > > > >
> > > > > --
> > > > > Brendan Reynolds (MVP)
> > > > > http://brenreyn.blogspot.com
> > > > >
> > > > > The spammers and script-kiddies have succeeded in making it
> impossible
> > > for
> > > > > me to use a real e-mail address in public newsgroups. E-mail replies
> to
> > > > > this post will be deleted without being read. Any e-mail claiming to
> be
> > > > > from brenreyn at indigo dot ie that is not digitally signed by me
> with a
> > > > > GlobalSign digital certificate is a forgery and should be deleted
> > > without
> > > > > being read. Follow-up questions should in general be posted to the
> > > > > newsgroup, but if you have a good reason to send me e-mail, you'll
> find
> > > > > a useable e-mail address at the URL above.
> > > > >
> > > > >
> > > > > "Patty O'Dors" <PattyODors@discussions.microsoft.com> wrote in
> message
> > > > > news:70F7A86D-7032-41D3-9F8B-E3FEBA0D3DBD@microsoft.com...
> > > > > > It's something very generic, error 3251: 'Object or provider is
> not
> > > > > capable
> > > > > > of performing requested operation'.
> > > > > >
> > > > > > Happens for every property, on querying the 'Value' property (of
> the
> > > > > > Property object)
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
>
>
>



Relevant Pages

  • Re: default constraint
    ... But the end result is the same - the combination of ADOX and the ... SQL Server developers were not, in my opinion, the main target of ADOX. ... GlobalSign digital certificate is a forgery and should be deleted without ... >> me to use a real e-mail address in public newsgroups. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: default constraint
    ... But the end result is the same - the combination of ADOX and the ... SQL Server developers were not, in my opinion, the main target of ADOX. ... GlobalSign digital certificate is a forgery and should be deleted without ... >> me to use a real e-mail address in public newsgroups. ...
    (microsoft.public.vb.general.discussion)
  • Re: default constraint
    ... But the end result is the same - the combination of ADOX and the ... SQL Server developers were not, in my opinion, the main target of ADOX. ... GlobalSign digital certificate is a forgery and should be deleted without ... >> me to use a real e-mail address in public newsgroups. ...
    (microsoft.public.sqlserver.programming)
  • Re: default constraint
    ... But the end result is the same - the combination of ADOX and the ... SQL Server developers were not, in my opinion, the main target of ADOX. ... GlobalSign digital certificate is a forgery and should be deleted without ... >> me to use a real e-mail address in public newsgroups. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Getting FK->PK relationships
    ... As far as I know, unlike SQL Server, Access does not support the ... ADOX is the object model of Microsoft Office Acces. ... Microsoft Online Community Support ... Delighting our customers is our #1 priority. ...
    (microsoft.public.data.odbc)

Quantcast