 |
| Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

July 14th, 2004, 01:40 PM
|
|
Authorized User
|
|
Join Date: Jun 2004
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Getting an error!
Hoping that someone can help me understand what am I doing wrong!
User's submit ticket then have the ticket number and information display on the feedback page.
The error am getting is :
Microsoft OLE DB Provider for SQL Server error '80040e14'
Invalid column name 'Ticktet_Number'.
/forms/Ticket_Request.asp, line 57
Line 57 is : objRS.Open strSQL, objConn, 3, 3
Code
<%
Dim strTicket_Number, strCriteria, objConn, strSQL
strTicket_Number = Request.Form("Ticket_Number")
set objConn=Server.CreateObject("ADODB.CONNECTION")
Objconn.Open "Provider=sqloledb;Data Source=Flmirsql02;Initial Catalog=Source_Forms;User Id=Source_Forms_User;Password=password;"
' Create recordset and retrieve values using the open connection
Dim objRS, AdOpenStatic, adLockReadOnly, adCmdTable
Set objRS = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT Ticktet_Number FROM Escalation_Forms where Ticket_Number = '" & strTicket_Number & "'"
objRS.Open strSQL, objConn, 3, 3
strCriteria = "Ticket_Number='" & strTicket_Number & "'"
objRS.Find strCriteria
If objRS.EOF then
Response.Write "The database does not recognize that" & _
strTicket_Number
else
Response.Write"<H2>Ticket Number Requested is " & strTicket_Number & ":</H2>" &_
"<b>Customer First Name:</b> " & objRS("First_Name") & "<br>" &_
"<b>Customer Last Name:</b> " & objRS("Last_Name") & "<br>" &_
"<b>Customer Account Number</b> " & objRS("Account_Number") & "<br>" &_
"<b>Customer Phone Number </b>" & objRS("Phone_Number") & "<br><br><br>"
End if
ObjRS.close
set objRS=Nothing
%>
|
|

July 14th, 2004, 01:49 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi, your on-line debugger here.
Quote:
|
quote:Invalid column name 'Ticktet_Number'.
|
Hmmm, I wonder what that error means... Hmmm, let me see. An invalid column, hmmm. Now, let me check what column he's talking about....Ahhh, I see, it's the Ticket_Number column. But that one is a valid column that exists in the database. Oh, no, it's not. It's Tick tet_Number with a t too much... Hmmm, I feel really weird now for not spotting this before.... ;)
Just kidding, easy to overlook these kind of thingies every now and then. Go out, get some fresh coffee, and try again.
Cheers,
Imar---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: She Bangs the Drums by The Stone Roses (Track 3 from the album: The Stone Roses) What's This?
|
|

July 14th, 2004, 02:06 PM
|
|
Authorized User
|
|
Join Date: Jun 2004
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Wow! I don't know how could I missed that one but you are right I do need I break away from the screen.
I am getting another message:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/forms/Ticket_Request.asp, line 72
Line 72 is :
Response.Write"<H2>Ticket Number Requested is " & strTicket_Number & ":</H2>" &_
"<b>Customer First Name:</b> " & objRS("First_Name") & "<br>" &_
"<b>Customer Last Name:</b> " & objRS("Last_Name") & "<br>" &_
"<b>Customer Account Number</b> " & objRS("Account_Number") & "<br>" &_
"<b>Customer Phone Number </b>" & objRS("Phone_Number") & "<br><br><br>"
End if
ObjRS.close
set objRS=Nothing
|
|

July 14th, 2004, 02:45 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
You're not selecting the columns in your SELECT statement, yet you try to use them in your ASP code. make sure each column you need is retrieved from the database.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: La Goutte D'Or by St Germain (Track 8 from the album: Tourist) What's This?
|
|

July 14th, 2004, 03:02 PM
|
|
Authorized User
|
|
Join Date: Jun 2004
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thank you Very much! I already have Activer Server Pages 3.0! Do you know of another book you can refer me to help increase my skills?
Thanks
|
|

July 14th, 2004, 03:11 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
If you're (considering) using Dreamweaver MX for your Web site development, take a look at this book:
http://www.wrox.com/WileyCDA/WroxTit...764555243.html
I am one of the authors, so I am of course a bit biased, but this book will help you develop database driven Web sites with ASP, something your topic deals with as well.
Of course there is a strong focus on Dreamweaver, but we're explaining a lot of general Web development stuff as well, like ASP, ADO, databases and so on.
There is a trial version available of Dreamweaver if you want to give it a test ride.
Otherwise, look at a book called "ASP Databases" It used to be a Wrox book, but I don't think it is anymore. Maybe it's still available at Amazon.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Soulfly (Universal Spirit Mix) by Soulfly (Track 16 from the album: Primitive) What's This?
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Insert Query Error & Run-Time Error 3022 |
DavidWE |
Access |
1 |
July 31st, 2008 11:17 AM |
| Ch 4: Parse error: syntax error, unexpected T_SL |
hanizar77 |
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 |
0 |
June 23rd, 2008 09:17 PM |
| [Resolved] Error calling a sp - parameter error |
snufse |
.NET Framework 2.0 |
2 |
February 12th, 2008 04:46 PM |
| Parse error: syntax error, unexpected T_STRING |
ginost7 |
Beginning PHP |
1 |
November 9th, 2007 02:51 AM |
| Phile Page error, visual studio error |
reps |
BOOK: ASP.NET Website Programming Problem-Design-Solution |
0 |
September 27th, 2003 10:11 AM |
|
 |