PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
ADOX VS2005 DN 2.0
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
ADOX VS2005 DN 2.0
![]() |
ADOX VS2005 DN 2.0 |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 OLEDB atabase Password=" & sXW & ";"Return catX End Function '(GFO_CatSet) |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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 OLEDB atabase Password=" & sXW & ";"> > Return catX > > End Function '(GFO_CatSet) > > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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 OLEDB atabase Password=" & sXW & ";">> >> Return catX >> >> End Function '(GFO_CatSet) >> >> >> |
|
|
|
#4 |
|
Guest
Posts: n/a
|
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 OLEDB atabase Password=" & sXW & ";"> >> > >> Return catX > >> > >> End Function '(GFO_CatSet) > >> > >> > >> > > > |
|
|
|
#5 |
|
Guest
Posts: n/a
|
That helped a lot.
Thks GW "Val Mazur (MVP)" <group51a@hotmail.com> wrote in message news 313874D-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 OLEDB atabase Password=" & sXW & ";">> >> >> >> Return catX >> >> >> >> End Function '(GFO_CatSet) >> >> >> >> >> >> >> >> >> |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 
atabase Password=" & sXW & ";"
