PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET ADOX VS2005 DN 2.0

Reply

ADOX VS2005 DN 2.0

 
Thread Tools Rate Thread
Old 07-02-2006, 10:21 PM   #1
GW
Guest
 
Posts: n/a
Default ADOX VS2005 DN 2.0


Used the function below as part of creating access mdb in DN 1.1 (VS2003)

In VS2005 it provides a "Warning: Return type of function 'GFO_CatSet' is
not CLS-compliant."

Suggestions? (This project has to stick with Access mdb)


Public Function GFO_CatSet( ByVal sPathDbName As String) As ADOX.Catalog

Dim catX As ADOX.Catalog

Dim sXW As String

sXW = GFS_GetXW()

catX = New ADOX.Catalog

catX.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source= " & sPathDbName & ";" _
& "User ID=;Password=;" _
& "Jet OLEDB:Engine Type=5;" _
& "Jet OLEDBatabase Password=" & sXW & ";"

Return catX

End Function '(GFO_CatSet)


  Reply With Quote
Old 07-02-2006, 10:49 PM   #2
=?Utf-8?B?S2VycnkgTW9vcm1hbg==?=
Guest
 
Posts: n/a
Default RE: ADOX VS2005 DN 2.0

GW,

It is just a warning, the code still works in VS2005, right?

Kerry Moorman


"GW" wrote:

> Used the function below as part of creating access mdb in DN 1.1 (VS2003)
>
> In VS2005 it provides a "Warning: Return type of function 'GFO_CatSet' is
> not CLS-compliant."
>
> Suggestions? (This project has to stick with Access mdb)
>
>
> Public Function GFO_CatSet( ByVal sPathDbName As String) As ADOX.Catalog
>
> Dim catX As ADOX.Catalog
>
> Dim sXW As String
>
> sXW = GFS_GetXW()
>
> catX = New ADOX.Catalog
>
> catX.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" _
> & "Data Source= " & sPathDbName & ";" _
> & "User ID=;Password=;" _
> & "Jet OLEDB:Engine Type=5;" _
> & "Jet OLEDBatabase Password=" & sXW & ";"
>
> Return catX
>
> End Function '(GFO_CatSet)
>
>
>

  Reply With Quote
Old 07-02-2006, 11:54 PM   #3
GW
Guest
 
Posts: n/a
Default Re: ADOX VS2005 DN 2.0

Yes the code still works.

Just would like to get rid of the warning as obviously it does not like what
it sees.

Haven't checked to see if there is another option to create an Access mdb
thru VS2005. Probably not as the push is for SQl / SQLexpress.

GW


"Kerry Moorman" <KerryMoorman@discussions.microsoft.com> wrote in message
news:C4AB6758-6E79-43D9-85A8-28E222E73F18@microsoft.com...
> GW,
>
> It is just a warning, the code still works in VS2005, right?
>
> Kerry Moorman
>
>
> "GW" wrote:
>
>> Used the function below as part of creating access mdb in DN 1.1 (VS2003)
>>
>> In VS2005 it provides a "Warning: Return type of function 'GFO_CatSet' is
>> not CLS-compliant."
>>
>> Suggestions? (This project has to stick with Access mdb)
>>
>>
>> Public Function GFO_CatSet( ByVal sPathDbName As String) As ADOX.Catalog
>>
>> Dim catX As ADOX.Catalog
>>
>> Dim sXW As String
>>
>> sXW = GFS_GetXW()
>>
>> catX = New ADOX.Catalog
>>
>> catX.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" _
>> & "Data Source= " & sPathDbName & ";" _
>> & "User ID=;Password=;" _
>> & "Jet OLEDB:Engine Type=5;" _
>> & "Jet OLEDBatabase Password=" & sXW & ";"
>>
>> Return catX
>>
>> End Function '(GFO_CatSet)
>>
>>
>>



  Reply With Quote
Old 08-02-2006, 03:02 AM   #4
=?Utf-8?B?VmFsIE1henVyIChNVlAp?=
Guest
 
Posts: n/a
Default Re: ADOX VS2005 DN 2.0

Hi,

Application will still work with this worning, but you could play with
CLSCompliant attribute for your function or project. Check next link about
using it

http://msdn2.microsoft.com/en-us/library/x97t56y6.aspx

--
Val Mazur
Microsoft MVP


"GW" wrote:

> Yes the code still works.
>
> Just would like to get rid of the warning as obviously it does not like what
> it sees.
>
> Haven't checked to see if there is another option to create an Access mdb
> thru VS2005. Probably not as the push is for SQl / SQLexpress.
>
> GW
>
>
> "Kerry Moorman" <KerryMoorman@discussions.microsoft.com> wrote in message
> news:C4AB6758-6E79-43D9-85A8-28E222E73F18@microsoft.com...
> > GW,
> >
> > It is just a warning, the code still works in VS2005, right?
> >
> > Kerry Moorman
> >
> >
> > "GW" wrote:
> >
> >> Used the function below as part of creating access mdb in DN 1.1 (VS2003)
> >>
> >> In VS2005 it provides a "Warning: Return type of function 'GFO_CatSet' is
> >> not CLS-compliant."
> >>
> >> Suggestions? (This project has to stick with Access mdb)
> >>
> >>
> >> Public Function GFO_CatSet( ByVal sPathDbName As String) As ADOX.Catalog
> >>
> >> Dim catX As ADOX.Catalog
> >>
> >> Dim sXW As String
> >>
> >> sXW = GFS_GetXW()
> >>
> >> catX = New ADOX.Catalog
> >>
> >> catX.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" _
> >> & "Data Source= " & sPathDbName & ";" _
> >> & "User ID=;Password=;" _
> >> & "Jet OLEDB:Engine Type=5;" _
> >> & "Jet OLEDBatabase Password=" & sXW & ";"
> >>
> >> Return catX
> >>
> >> End Function '(GFO_CatSet)
> >>
> >>
> >>

>
>
>

  Reply With Quote
Old 08-02-2006, 03:28 AM   #5
GW
Guest
 
Posts: n/a
Default Re: ADOX VS2005 DN 2.0

That helped a lot.

Thks GW


"Val Mazur (MVP)" <group51a@hotmail.com> wrote in message
news313874D-74D0-41E6-9573-772CEE840ED1@microsoft.com...
> Hi,
>
> Application will still work with this worning, but you could play with
> CLSCompliant attribute for your function or project. Check next link about
> using it
>
> http://msdn2.microsoft.com/en-us/library/x97t56y6.aspx
>
> --
> Val Mazur
> Microsoft MVP
>
>
> "GW" wrote:
>
>> Yes the code still works.
>>
>> Just would like to get rid of the warning as obviously it does not like
>> what
>> it sees.
>>
>> Haven't checked to see if there is another option to create an Access mdb
>> thru VS2005. Probably not as the push is for SQl / SQLexpress.
>>
>> GW
>>
>>
>> "Kerry Moorman" <KerryMoorman@discussions.microsoft.com> wrote in message
>> news:C4AB6758-6E79-43D9-85A8-28E222E73F18@microsoft.com...
>> > GW,
>> >
>> > It is just a warning, the code still works in VS2005, right?
>> >
>> > Kerry Moorman
>> >
>> >
>> > "GW" wrote:
>> >
>> >> Used the function below as part of creating access mdb in DN 1.1
>> >> (VS2003)
>> >>
>> >> In VS2005 it provides a "Warning: Return type of function 'GFO_CatSet'
>> >> is
>> >> not CLS-compliant."
>> >>
>> >> Suggestions? (This project has to stick with Access mdb)
>> >>
>> >>
>> >> Public Function GFO_CatSet( ByVal sPathDbName As String) As
>> >> ADOX.Catalog
>> >>
>> >> Dim catX As ADOX.Catalog
>> >>
>> >> Dim sXW As String
>> >>
>> >> sXW = GFS_GetXW()
>> >>
>> >> catX = New ADOX.Catalog
>> >>
>> >> catX.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" _
>> >> & "Data Source= " & sPathDbName & ";" _
>> >> & "User ID=;Password=;" _
>> >> & "Jet OLEDB:Engine Type=5;" _
>> >> & "Jet OLEDBatabase Password=" & sXW & ";"
>> >>
>> >> Return catX
>> >>
>> >> End Function '(GFO_CatSet)
>> >>
>> >>
>> >>

>>
>>
>>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off