OK,
I'm trying to place records from a dataset into some variables. Here is the code (long)
the problem is that it does not get any values after:Code:Public Function RetrieveInfo(ByVal id As Integer) As String Dim conn As New CRAB.COMPSERV.SQL.SQLConn("sysadmin", "dogfish") Dim ds As New DataSet() conn.OpenDataSource() ds = conn.SelectSqlData("Select * from SYSADMIN_MAIN where id = " & id, "SYSADMIN_MAIN", True) sAppNumber = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("AppNum")) sInputDate = CDate(ds.Tables("SYSADMIN_MAIN").Rows(0)("dt")) sReleaseDate = CDate(ds.Tables("SYSADMIN_MAIN").Rows(0)("RDt")) sProjName = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("PName")) sProjType = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("PType")) sSoftType = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("SType")) sAppType = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("AType")) sContOwners = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("COwners")) sContact = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("PContact")) sProjScope = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("Scope")) sAppDescrip = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("ADescription")) sEnvironment = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("Environment")) sPlatform = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("Platform")) sDevStatus = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("DevStatus")) sAppNumber = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("IUsers")) sProgLangsMethods = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("PMethodLangs")) sAppName = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("AppFlName")) sSolName = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("SolName")) sAppLocation = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("AppLocation")) sDependancies = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("LibSoftDep")) sDatabaseUsage = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("dbAccessed")) sDatabase1 = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("db1")) sRead1 = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("db1Read")) sWrite1 = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("db1Write")) sLocation1 = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("db1Loc")) sDBconnect1 = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("db1ConnMethod")) sDatabase2 = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("db2")) sRead2 = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("db2Read")) sWrite2 = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("db2Write")) sLocation2 = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("db2Loc")) sDBConnect2 = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("dbConnMethod")) sDesDbUsage = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("DBDescrip")) sFileShares = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("flShareAccess")) sBrowser = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("minBrowser")) sServicePack = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("SPReqs")) sComments1 = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("SysComments")) sKnownIssues = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("Issues")) sAuthentication = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("EUsrAuth")) sEscPriv = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("EscPriv")) sEndAccountType = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("EndUsrAcct")) sEndAccount = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("EUsrName")) sServiceAccountType = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("SvcAcct")) sServiceAccount = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("SvcAcctName")) sSecurity = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("DescripSecModel")) sComments2 = CStr(ds.Tables("SYSADMIN_MAIN").Rows(0)("Comments")) End Function
[code]
sInputDate = CDate(ds.Tables("SYSADMIN_MAIN").Rows(0)("dt"))
Starting with:
It does not get anything in return for the query. It's so weird.Code:sReleaseDate = CDate(ds.Tables("SYSADMIN_MAIN").Rows(0)("RDt"))




Reply With Quote