-
Filter error: Get_RS_GetCount
I am getting an Get_RS_GetCount error when I try to filter on a name field in my grid.
I am displaying a database table that contains two employee ids (a User id and a
Designator id). I want to display the person's names as well as their ids. I also want to be
able to filter by the name, rather than the id.
My sql statement is looking up the names for both ids from the same table. So in my SQL
stmt, I aliased the names (since the field names were identical). I think it is this aliasing
that is causing the Get_RS_GetCount error.
I tried adding a dbGetCountSQL parameter, but this did not remove the error.
Is there a better way to display the names and be able to filter them and not get the error?
The error is as follows:
Error # (Get_RS_GetCount - After open mySQL) = 80040E14(-2147217900)
Description = ORA-00904: invalid column name
Source = Microsoft OLE DB Provider for Oracle
SQL State =
Native Error = 0
Error # (Get_RS_GetCount - After open mySQL) = 80040E14(-2147217900)
Description = One or more errors occurred during processing of command.
Source = Microsoft OLE DB Provider for Oracle
SQL State =
Native Error = 0
My code is as follows:
Dim oAspdb 'grid object
Dim sSQL 'sql stmt
dim lRecs 'grid record count
dim iUnit 'grid unit parameter
Dim sNM 'grid name map string
iUnit = CInt(Session("GridUnit" & "4"
Set oAspdb = Server.CreateObject("Asp.db"
oAspdb.dbDBType = "ORACLE"
oAspdb.dbUnit = iUnit 'unique number for this grid on this page.
oAspdb.dbDSN = Session("gConnStr" 'oledb connect
sSQL = "SELECT A.NTD_BEMSID, B.HC_EMP_LAST_NAME AS DESLNAME, B.HC_EMP_FIRST_NAME AS DESFNAME, B.HC_EMP_MID_INITL AS DESMNAME, " _
& "A.FK_NTU_BEMSID, C.HC_EMP_LAST_NAME AS USERLNAME, C.HC_EMP_FIRST_NAME AS USERFNAME, C.HC_EMP_MID_INITL AS USERMNAME, " _
& "A.NTD_LAST_UPDATE_UID, A.NTD_LAST_UPDATE_TIMESTAMP " _
& "FROM NWT_DESIGNATORS A, RPP_EMPLOYEE B, RPP_EMPLOYEE C " _
& "WHERE A.NTD_BEMSID = B.HC_BEMSID(+) AND " _
& "A.FK_NTU_BEMSID = C.HC_BEMSID(+) " _
& "ORDER BY B.HC_EMP_LAST_NAME, B.HC_EMP_FIRST_NAME "
oAspdb.dbsql = sSQL 'sql stmt for contents
oAspdb.dbButtonAnchor = false
oAspdb.dbColor = "white,navy,navy,black,lightsteelblue"
oAspdb.dbCountSQL = "SELECT COUNT(*) FROM NWT_DESIGNATORS"
oAspdb.dbCSVName="NWTDesignatorsTable.csv" 'name of download file.
oAspdb.dbFilterHideFlds = "NTD_LAST_UPDATE_TIMESTAMP"
oAspdb.dbFilterParams = "CaseSensitive=False"
oAspdb.dbFormDisplayFlds = -1 'turn off rec display when click on record.
oAspdb.dbGridColSort = true 'turn off sorting when click on col header.
oAspdb.dbGridInc = "10" 'number of rows per page in grid
oAspdb.dbGridIndex = false 'turn off numbered hyperlink row.
oAspdb.dbGridTableTag="width='100%' BORDER='1'" 'Set table border
oAspdb.dbImageDir="images/ASPDBGrid/" 'directory for button images
mc = "NTD_LAST_UPDATE_TIMESTAMP,,Format=[DD-MMM-YYYY hh:mm:ss AMPM]"
oAspdb.dbMagicCell = mc
oAspdb.dbMode = "dual-horiz" 'display grid, form, etc.
sNM = "NTD_BEMSID,<font color=white>Des. BEMSID</font>;DESLNAME,<font color=white>Des. LName</font>;DESFNAME,<font color=white>Des. FName</font>;DESMNAME,<font color=white>Des. MI</font>;FK_NTU_BEMSID,<font color=white>User BEMSID</font>;USERLNAME,<font color=white>User LName</font>;USERFNAME,<font color=white>User FName</font>;USERMNAME,<font color=white>User MI</font>;NTD_LAST_UPDATE_UID,<font color=white>LU By</font>;NTD_LAST_UPDATE_TIMESTAMP,<font color=white>LU Timestamp</font>"
oAspdb.dbNameMap = sNM 'override grid hdr names and font color. This
oAspdb.dbNavigation="bottom" 'pos of nav bar
oAspdb.dbNavigationItem="top, bottom, next, prev, filter, download, add" 'contents of nav bar
oAspdb.dbNavigationIcon="std" 'define graphic button file names. STD means use standard names hardcoded in grid.
oAspdb.dbSuppressMsg = true 'suppresses some grid error messages.
oAspdb.dbOptions="(,HeaderFontTag=Face=Arial Size=1;CellFontTag=Face=Arial size=1;NavGoToFldIndex=1"
s = zHead & ",<center><font face='Arial' color=navy size=2><b>To move directly to a record enter a few letters of the Designator Last Name in the box next to the Go button and press Go.</b></font></center>;"
oAspdb.dbUserLocalText = s
'Edit parameters
oAspdb.dbButtonsOnOff = "FilterDropOff,EditDropOff"
oAspdb.dbEditAddROFlds = "NTD_LAST_UPDATE_UID, NTD_LAST_UPDATE_TIMESTAMP"
oAspdb.dbEditUpdateROFlds = "NTD_LAST_UPDATE_UID, NTD_LAST_UPDATE_TIMESTAMP"
oAspdb.dbEditFlds="(;,)NTD_BEMSID, FK_NTU_BEMSID, NTD_LAST_UPDATE_UID[" & Session("NWT_USER" & "|" & Session("NWT_USER" & "], NTD_LAST_UPDATE_TIMESTAMP[timestamp(dd-mmm-yyyy hh:mm:ss ampm)|timestamp(dd-mmm-yyyy hh:mm:ss ampm)]"
oAspdb.dbEditParams = "(;,)TableName=NWT_DESIGNATORS,BookMarkFlds=NT D_BEMSID+FK_NTU_BEMSID," _
& "DeleteIcon=True,EditIconsLayout=Left"
oAspdb.dbEditDropFlds = "(;~/)NTD_BEMSID~~~~SELECT HC_BEMSID, (HC_BEMSID || ': '||HC_EMP_LAST_NAME || ', '||HC_EMP_FIRST_NAME||' '||HC_EMP_MID_INITL) AS EMPNAME "_
& "FROM RPP_EMPLOYEE ORDER BY HC_EMP_LAST_NAME, HC_EMP_FIRST_NAME~~NoBlank;" _
& "FK_NTU_BEMSID~~~~SELECT HC_BEMSID, (HC_BEMSID || ': '||HC_EMP_LAST_NAME || ', '||HC_EMP_FIRST_NAME||' '||HC_EMP_MID_INITL) AS EMPNAME "_
& "FROM RPP_EMPLOYEE ORDER BY HC_EMP_LAST_NAME, HC_EMP_FIRST_NAME~~NoBlank;"
oAspdb.dbDebug = 102
oAspdb.aspDB 'draw grid
lRECS = oAspdb.dbRecordCount 'get record count from grid
-
Filter error: Get_RS_GetCount (reply)
Tried adding original name of field to namemap, as follows:
sNM = "NTD_BEMSID,<font color=white>Des. BEMSID</font>;DESLNAME,<font color=white>Des. LName</font>,,B.HC_EMP_LAST_NAME;DESFNAME,<font color=white>Des. FName</font>;DESMNAME,<font color=white>Des. MI</font>;FK_NTU_BEMSID,<font color=white>User BEMSID</font>;USERLNAME,<font color=white>User LName</font>,,C.HC_EMP_LAST_NAME;USERFNAME,<font color=white>User FName</font>;USERMNAME,<font color=white>User MI</font>;NTD_LAST_UPDATE_UID,<font color=white>LU By</font>;NTD_LAST_UPDATE_TIMESTAMP,<font color=white>LU Timestamp</font>"
oAspdb.dbNameMap = sNM 'override grid hdr names and font color. This
Note that original field name only added to DESLNAME and USERLNAME because I changed
code to hide both sets of first names and middle names on the filter screen.
Still getting Get_RS_GetCount error. What else can I try??
Thanks
Nancy
------------
Frank Kwong at 3/15/01 6:03:14 PM
Goto ->
http://www.usintertech.com/aspdb/casestudy/casestudy.shtm
and look at case 19 & 23
FK
------------
Nancy Steinmann at 3/14/01 7:45:41 PM
I am getting an Get_RS_GetCount error when I try to filter on a name field in my grid.
I am displaying a database table that contains two employee ids (a User id and a
Designator id). I want to display the person's names as well as their ids. I also want to be
able to filter by the name, rather than the id.
My sql statement is looking up the names for both ids from the same table. So in my SQL
stmt, I aliased the names (since the field names were identical). I think it is this aliasing
that is causing the Get_RS_GetCount error.
I tried adding a dbGetCountSQL parameter, but this did not remove the error.
Is there a better way to display the names and be able to filter them and not get the error?
The error is as follows:
Error # (Get_RS_GetCount - After open mySQL) = 80040E14(-2147217900)
Description = ORA-00904: invalid column name
Source = Microsoft OLE DB Provider for Oracle
SQL State =
Native Error = 0
Error # (Get_RS_GetCount - After open mySQL) = 80040E14(-2147217900)
Description = One or more errors occurred during processing of command.
Source = Microsoft OLE DB Provider for Oracle
SQL State =
Native Error = 0
My code is as follows:
Dim oAspdb 'grid object
Dim sSQL 'sql stmt
dim lRecs 'grid record count
dim iUnit 'grid unit parameter
Dim sNM 'grid name map string
iUnit = CInt(Session("GridUnit" & "4"
Set oAspdb = Server.CreateObject("Asp.db"
oAspdb.dbDBType = "ORACLE"
oAspdb.dbUnit = iUnit 'unique number for this grid on this page.
oAspdb.dbDSN = Session("gConnStr" 'oledb connect
sSQL = "SELECT A.NTD_BEMSID, B.HC_EMP_LAST_NAME AS DESLNAME, B.HC_EMP_FIRST_NAME AS DESFNAME, B.HC_EMP_MID_INITL AS DESMNAME, " _
& "A.FK_NTU_BEMSID, C.HC_EMP_LAST_NAME AS USERLNAME, C.HC_EMP_FIRST_NAME AS USERFNAME, C.HC_EMP_MID_INITL AS USERMNAME, " _
& "A.NTD_LAST_UPDATE_UID, A.NTD_LAST_UPDATE_TIMESTAMP " _
& "FROM NWT_DESIGNATORS A, RPP_EMPLOYEE B, RPP_EMPLOYEE C " _
& "WHERE A.NTD_BEMSID = B.HC_BEMSID(+) AND " _
& "A.FK_NTU_BEMSID = C.HC_BEMSID(+) " _
& "ORDER BY B.HC_EMP_LAST_NAME, B.HC_EMP_FIRST_NAME "
oAspdb.dbsql = sSQL 'sql stmt for contents
oAspdb.dbButtonAnchor = false
oAspdb.dbColor = "white,navy,navy,black,lightsteelblue"
oAspdb.dbCountSQL = "SELECT COUNT(*) FROM NWT_DESIGNATORS"
oAspdb.dbCSVName="NWTDesignatorsTable.csv" 'name of download file.
oAspdb.dbFilterHideFlds = "NTD_LAST_UPDATE_TIMESTAMP"
oAspdb.dbFilterParams = "CaseSensitive=False"
oAspdb.dbFormDisplayFlds = -1 'turn off rec display when click on record.
oAspdb.dbGridColSort = true 'turn off sorting when click on col header.
oAspdb.dbGridInc = "10" 'number of rows per page in grid
oAspdb.dbGridIndex = false 'turn off numbered hyperlink row.
oAspdb.dbGridTableTag="width='100%' BORDER='1'" 'Set table border
oAspdb.dbImageDir="images/ASPDBGrid/" 'directory for button images
mc = "NTD_LAST_UPDATE_TIMESTAMP,,Format=[DD-MMM-YYYY hh:mm:ss AMPM]"
oAspdb.dbMagicCell = mc
oAspdb.dbMode = "dual-horiz" 'display grid, form, etc.
sNM = "NTD_BEMSID,<font color=white>Des. BEMSID</font>;DESLNAME,<font color=white>Des. LName</font>;DESFNAME,<font color=white>Des. FName</font>;DESMNAME,<font color=white>Des. MI</font>;FK_NTU_BEMSID,<font color=white>User BEMSID</font>;USERLNAME,<font color=white>User LName</font>;USERFNAME,<font color=white>User FName</font>;USERMNAME,<font color=white>User MI</font>;NTD_LAST_UPDATE_UID,<font color=white>LU By</font>;NTD_LAST_UPDATE_TIMESTAMP,<font color=white>LU Timestamp</font>"
oAspdb.dbNameMap = sNM 'override grid hdr names and font color. This
oAspdb.dbNavigation="bottom" 'pos of nav bar
oAspdb.dbNavigationItem="top, bottom, next, prev, filter, download, add" 'contents of nav bar
oAspdb.dbNavigationIcon="std" 'define graphic button file names. STD means use standard names hardcoded in grid.
oAspdb.dbSuppressMsg = true 'suppresses some grid error messages.
oAspdb.dbOptions="(,HeaderFontTag=Face=Arial Size=1;CellFontTag=Face=Arial size=1;NavGoToFldIndex=1"
s = zHead & ",<center><font face='Arial' color=navy size=2><b>To move directly to a record enter a few letters of the Designator Last Name in the box next to the Go button and press Go.</b></font></center>;"
oAspdb.dbUserLocalText = s
'Edit parameters
oAspdb.dbButtonsOnOff = "FilterDropOff,EditDropOff"
oAspdb.dbEditAddROFlds = "NTD_LAST_UPDATE_UID, NTD_LAST_UPDATE_TIMESTAMP"
oAspdb.dbEditUpdateROFlds = "NTD_LAST_UPDATE_UID, NTD_LAST_UPDATE_TIMESTAMP"
oAspdb.dbEditFlds="(;,)NTD_BEMSID, FK_NTU_BEMSID, NTD_LAST_UPDATE_UID[" & Session("NWT_USER" & "|" & Session("NWT_USER" & "], NTD_LAST_UPDATE_TIMESTAMP[timestamp(dd-mmm-yyyy hh:mm:ss ampm)|timestamp(dd-mmm-yyyy hh:mm:ss ampm)]"
oAspdb.dbEditParams = "(;,)TableName=NWT_DESIGNATORS,BookMarkFlds=NT D_BEMSID+FK_NTU_BEMSID," _
& "DeleteIcon=True,EditIconsLayout=Left"
oAspdb.dbEditDropFlds = "(;~/)NTD_BEMSID~~~~SELECT HC_BEMSID, (HC_BEMSID || ': '||HC_EMP_LAST_NAME || ', '||HC_EMP_FIRST_NAME||' '||HC_EMP_MID_INITL) AS EMPNAME "_
& "FROM RPP_EMPLOYEE ORDER BY HC_EMP_LAST_NAME, HC_EMP_FIRST_NAME~~NoBlank;" _
& "FK_NTU_BEMSID~~~~SELECT HC_BEMSID, (HC_BEMSID || ': '||HC_EMP_LAST_NAME || ', '||HC_EMP_FIRST_NAME||' '||HC_EMP_MID_INITL) AS EMPNAME "_
& "FROM RPP_EMPLOYEE ORDER BY HC_EMP_LAST_NAME, HC_EMP_FIRST_NAME~~NoBlank;"
oAspdb.dbDebug = 102
oAspdb.aspDB 'draw grid
lRECS = oAspdb.dbRecordCount 'get record count from grid
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|