|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ADOX VS2005 DN 2.0In 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:Database Password=" & sXW & ";" Return catX End Function '(GFO_CatSet) GW,
It is just a warning, the code still works in VS2005, right? Kerry Moorman Show quote "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:Database Password=" & sXW & ";" > > Return catX > > End Function '(GFO_CatSet) > > > 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 Show quote "Kerry Moorman" <KerryMoor***@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:Database Password=" & sXW & ";" >> >> Return catX >> >> End Function '(GFO_CatSet) >> >> >> 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 -- Show quoteVal 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" <KerryMoor***@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:Database Password=" & sXW & ";" > >> > >> Return catX > >> > >> End Function '(GFO_CatSet) > >> > >> > >> > > > That helped a lot.
Thks GW Show quote "Val Mazur (MVP)" <group***@hotmail.com> wrote in message news:D313874D-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" <KerryMoor***@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:Database Password=" & sXW & ";" >> >> >> >> Return catX >> >> >> >> End Function '(GFO_CatSet) >> >> >> >> >> >> >> >> >> |
|||||||||||||||||||||||