473,382 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Having trouble with an ASP error!?

Date: 02/26/2004 01:00PM PST

Here is the code.

'------------------------------------------------'
'- Gets Managers details such as name & email -'
'------------------------------------------------'
Sub GetManagerDetails(id)
Dim strSQL, rs
strSQL = "SELECT tblUsers.Name, tblUsers.LastName,
tblUsers.EmailWork "&
"FROM tblUsers "& _
"WHERE (((tblUsers.ID)="& id &"));"

' I placed response.write(strsql) here and that showed me that the
strSQL was in fact ok.

Set rs = conn.Execute(strSQL) '--> this is LINE 202

If not rs.bof and not rs.eof Then
strManagerName = rs("Name") & " " & rs("LastName")
strManagerEmail = rs("EmailWork")
End If
rs.Close
Set rs = Nothing
End Sub
Jul 19 '05 #1
1 1144
Asked and answered in another group. Please do not multipost.
http://www.aspfaq.com/5003

Ray at home

"slonik" <ze****@aol.com> wrote in message
news:Tn**********************@news.easynews.com...
Date: 02/26/2004 01:00PM PST

Here is the code.

'------------------------------------------------'
'- Gets Managers details such as name & email -'
'------------------------------------------------'
Sub GetManagerDetails(id)
Dim strSQL, rs
strSQL = "SELECT tblUsers.Name, tblUsers.LastName,
tblUsers.EmailWork "&
"FROM tblUsers "& _
"WHERE (((tblUsers.ID)="& id &"));"

' I placed response.write(strsql) here and that showed me that the
strSQL was in fact ok.

Set rs = conn.Execute(strSQL) '--> this is LINE 202

If not rs.bof and not rs.eof Then
strManagerName = rs("Name") & " " & rs("LastName")
strManagerEmail = rs("EmailWork")
End If
rs.Close
Set rs = Nothing
End Sub
.
Dim strManagerName, strManagerEmail
Dim k, intManagerID
For k = 0 to intManagersIDs
intManagerID = Request.Form("ID"& k)
Call GetManagerDetails(intManagerID)
Next

Problem is: even when I do response.write(strSQL) and can see that the intManagerID variable has a numeric value, once I execute the SQL string it looks like the variable becomes empty. There is a valid connection to the
database that's being used before and after this statement. If I force the
value to be 171 by hardcoding it, it works too.
Error:

Microsoft JET Database Engine error '80040e14'

Extra ) in query expression '(((tblUsers.ID)=))'.

/trellistech/test/admin/re_email_mgrs.asp, line 202

thanks for you times


Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Anand | last post by:
Hi i am having trouble adding a recordset into the access database, the code seems to be working fine it passs and parses through all variables just fine without showing any errors and also when i...
1
by: ajackson | last post by:
i am having some trouble installing SQl server Reporting Services. well, in order to install the reporting services i have to install Service Pack 3a. so through my installation of package 3a i...
2
by: Jozef | last post by:
Hello, I am trying to put together a module and open a workspace on a database that has a simple password (using Access XP). This is the lin that I'm having trouble with; Set wrk =...
0
by: Jozef | last post by:
Hello, I'm having trouble with the download links on my web server. The error I'm getting is; CGI Timeout The specified CGI application exceeded the allowed time for processing. The server...
9
by: Christian Blackburn | last post by:
Hi Gang, I don't know what to make of all of this, but I'm having nothing, but trouble copying data to the clipboard which should be the easiest thing in the world. The only systems I can get...
1
by: Jozef | last post by:
Hello. I'm having trouble creating a blank solution (and ASP.net web application) from my laptop. I own the server (in fact it's sitting right next to me) and have added the URL to the trusted...
9
suzee_q00
by: suzee_q00 | last post by:
I will admit that lots of times the obvious eludes me and this is most likely one of those times but if anyone has any ideas on what I can do to make this code work, I would greatly appreciate it....
3
by: Michael | last post by:
Hi all, I'm having trouble PInvoking a TCHAR within a struct. I'll paste the specific struct's API definition below. I've tried so many numerous variations. The main Win32 error I get is...
2
by: spidey12345 | last post by:
what i need this program to do is to read paragraphs like "st blah blh test ere se sit blha eere w" and then it will reformat to "st blah...
12
by: Fozzi | last post by:
Hey all I have been working on a project which allows me to write to a file and retrieve from that file, but i having trouble with it These are my inputs: private int flightno; ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.