DECLARE INTEGER SQLPrimaryKeys IN ODBC32 ;
INTEGER hStmt, ;
>Thanks.
>
>Sarosh
>
>*--
>Func GetPKeys(as_TblQualifier, as_TblOwner, as_TblName)
>local ls_Return
>
>m.olddec = set("decimal")
>set deci to 0
>hstmt = val(SYS(3053)) && SYS(3053) - ODBC Environment Handle
>set deci to (m.olddec)
>*--
>m.max = 128
>szTblQualifier = as_TblQualifier &&padr("northwnd",m.max) &&+ chr(0)
>cbTblQualifier = len(szTblQualifier)
>*--
>szTblOwner = as_TblOwner &&padr("dbo",m.max) &&+ chr(0)
>cbTblOwner = len(szTblOwner)
>*--
>szTblName = as_TblName &&padr("Products",m.max) &&+ chr(0)
>cbTblName = len(szTblName)
>*--
>Declare integer SQLPrimaryKeys in "odbc32.dll" integer hstmt, string @ szTblQualifier, integer cbTblQualifier, string @ szTblOwner, integer cbTblOwner, string @ szTblName, integer cbTblName
>
>ls_Return = SQLPrimaryKeys(hstmt, @szTblQualifier, cbTblQualifier, @szTblOwner, cbTblOwner, @szTblName, cbTblName)
>*--returns 65534
>
>Return ls_Return
>
>*--
>*-- VB ODBC API's Definitions -- 32 bit versions
>
>*-- Declare Function SQLForeignKeys Lib "odbc32.dll" (ByVal hstmt&, ByVal PTQual&, ByVal PTQual%, ByVal PTOwnr&, ByVal PTOwnr%, ByVal PTName&, ByVal PTName%, ByVal FTQual&, ByVal FTQf%, ByVal FTOwnr&, ByVal FTOwnr%, ByVal FTName&, ByVal FTName%) As Integer
>
>*-- Declare Function SQLPrimaryKeys Lib "odbc32.dll" (ByVal hstmt&, szTblQualifier As Any, ByVal cbTblQualifier%, szTblOwner As Any, ByVal cbTblOwner%, szTblName As Any, ByVal cbTblName%) As Integer
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater
NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC
The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys