This topic is locked

Can I get a bit of help with this error please?

3/20/2006 11:49:15 AM
ASPRunnerPro General questions
T
tseeber author

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=2652&image=1&table=forumtopics' class='bbc_emoticon' alt=':o' />
I have zero experience with all of this and am trying to figure it out from scratch. So here goes,
For some reason whe I am on the 'list' view of the ASPRunner created forms for my user database when I click on 'View' to look at the individual record it seems to be confusing the username for the actual column name (which is UName in my table). I also get it when I try to select 'delete' for a row on the form. I am not sure why this is. Here is the error:
Table: dbo.tblUsers, View record [UName: jsmith]
--------------------------------------------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'jsmith'.
/users/tblUsers_view.asp, line 65
Here is the code in the tblUsers_variables.asp file where I think part of the problem may lie (it may be taking 'UName' from here in that third line and confusing it with the column name??). Those 'strKeyField' variables are creating this URL:
http://www.ecaregiver.com/users/tblUsers_v...only&masterkey=
Here is the code:
<!--#include file='commonfunctions.asp'-->
<%
strKeyField="UName"

strKeyField2=""

strKeyField3=""

strTableName="[dbo].[tblUsers]"

PageSize=20

session("pagesize") = PageSize

strLeftWrapper="["

strRightWrapper="]"

gstrOrderBy="ORDER BY [UName] ASC"

bKeyFieldEditable1=True

bKeyFieldEditable2=False

bKeyFieldEditable3=False

gstrSQL = "select [UName], [UserPW], [UserTitle], [UserFirstName], [UserLastName], [UserAddress1], [UserAddress2], [UserCity], [UserState], [UserZIP], [UserPhone], [UserFax], [UserEmail], [CaregiverUser], [ProviderNum], [AccessCounter], [ReceiveStNewsLetter], [AccessLevel] From [dbo].[tblUsers]"

gstrQuote = Session(strTableName & "_gstrQuote")

gstrQuote2 = Session(strTableName & "_gstrQuote2")

gstrQuote3 = Session(strTableName & "_gstrQuote3")
cNumberOfChars = 80
cXMLTopNode = "rs"

cXMLRowNode = "row"
cAdvSecurityMethod = 0

%>

T
tseeber author 3/20/2006

Some code from the tblUsersview.asp page if it helps:
<%

Session.LCID = 1033

'On Error Resume Next
' open database connection

Set rs = server.CreateObject ("ADODB.Recordset")

set dbConnection = server.CreateObject ("ADODB.Connection")

dbConnection.ConnectionString = strConnection

dbConnection.Open

Call ReportError
'prepare SQL query

sMode = "Edit"

strSQL=gstrSQL
sWhere = AddWrappers(strKeyField) & "=" & gstrQuote & Replace(Request.QueryString("editid"),"'","''") & gstrQuote

if strKeyField2<>"" then


sWhere=sWhere & " and " & AddWrappers(strKeyField2) & "=" & gstrQuote2 & Replace(Request.QueryString("editid2"),"'","''") & gstrQuote2

if strKeyField3<>"" then _

sWhere=sWhere & " and " & AddWrappers(strKeyField3) & "=" & gstrQuote3 & Replace(Request.QueryString("editid3"),"'","''") & gstrQuote3
strSQL = AddWhere(strSQL, sWhere)
Response.Write "<h1>Table: dbo.tblUsers, " & "View record" & " [" & strKeyField & ": " & Request.QueryString("editid") & "]</h1>"
response.write "<div align=left><hr width=300 noshade size=1></div>"
LogInfo(strSQL)

rs.open strSQL, dbConnection

Call ReportError
One other thig that may be useful to know: I have a little SQL Server Service Manager running on my system and the scripts generated by ASPRunner are working. When I moved them to my provider I started getting this error. Could it be their configuration? If so what and what shold I do?

Sergey Kornilov admin 3/20/2006

It appears something is wrong with your ISP Web server config. Please contact me directly at support@xlinesoft.com. I need to take a closer look at this.

T
tseeber author 3/20/2006

It appears something is wrong with your ISP Web server config. Please contact me directly at support@xlinesoft.com. I need to take a closer look at this.


I just sent you an e-mail at that address. Thanks! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=8672&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />