Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sys(2015) or timestamp in VB?
Message
 
 
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00758379
Message ID:
00762921
Vues:
15
Great. BTW, can you help me a little:
http://twg-dev-dq.thewarrengroup.com/creditrecords/FormResult.asp

Here is what this last note says:
----------------------------------------
well...I'm just telling you that the best way to debug is to go through it and use 'trap point' and use the response write to show where it is dying...

I'll just say that CartID = "" is not necessary the same as = null...there is the whole notion of Blank/Null/Not Initialized/Empty. I'm not sure whether this is the problem or not, but you will have to step things through. If you will look at the error log (from the previous email that I've just sent you)...the error is on Line 54 of Insert<>.asp and the error is in cint(null) <--- what do you get ???

I did noticed that you have 'On Err Resume Next' in some of the places. Let me just say this. Don't ever ever ever ever use this. This hides a lot of problems that it will almost always comes back and get you.

Other things such as using non-default page size, recordsize, etc...don't use them unless you have a good reasons on why you're using it...
-----Original Message-----
From: Nadya Nosonovsky
Sent: Fri 3/7/2003 1:53 PM
To: Joe Chan
Cc:
Subject: RE: sample output


Thanks. I know tips about debugging ASP and using response.write, response.end method. I also have debugging.asp, which would list everything.

Yes, I'm using DNS-less ODBC connection locally. Do you see a problem in this piece of code?:
<%
Dim CartID
CartID = RetrieveCartID() ' Calling function from ShoppingCartFunctions
if CartID = "" then
   Response.write " <font color = red>Cart is empty!</font>"
   Response.end()
end if   
 
dim strConn
strConn = GetShoppingCartStrConn()
dim ListOfCodes
ListOfCodes = Request.form("Selection")
 
if not IsEmpty(ListOfCodes) then
    DeleteFromCartContent ListOfCodes  'Invoke a function from ShoppigCartFunctions 
end if   
 
dim strSQL, I, records, rs1, dbConn
 
records = request.QueryString("records") 
Call OpenRS(rs1,dbConn, strConn)
 
rs1.PageSize = 12
rs1.CacheSize = 300
rs1.CursorLocation = adUseClient
 
strSQL = "select CartContentID, CartContent.CreditCategory, DescriptionText, CategoryDescr, NumOfRecords, Price*NumOfRecords as Amount from CartContent inner Join PriceInfo " &_
         "on CartContent.CreditCategory = Price.Info.CreditCategory where CartID = " & CartID & " order by CartContent.CreditCategory, DescriptionText"
 
rs1.Open strSQL, strConn, adOpenForwardOnly, adLockReadOnly, adCmdText
%>
----------------------------------------------------------------------
Isn't the highlighted line just ridiculous. Especially because I have down bellow:
If Err.Number > 0 Then
      Response.Write "<FONT SIZE=5><B>" & "VBScript Errors:" & "</B></FONT><P>"
      Response.Write "<B>" & "Error Number: " & "</B>" & Err.Number & "<P>"
      Response.Write "<B>" & "Error Descr: " & "</B>" & Err.Description & "<P>"
      Response.Write "<B>" & "Help Context: " & "</B>" & Err.HelpContext & "<P>"
      Response.Write "<B>" & "Help Path: " & "</B>" & Err.HelpPath & "<P>"
      Response.Write "<B>" & "Native Error: " & "</B>" & Err.NativeError & "<P>"
      Response.Write "<B>" & "Source: " & "</B>" & Err.Source & "<P>"
      Response.Write "<B>" & "SQL State: " & "</B>" & Err.SQLState & "<P>"
   End If
   dim Counter
   If dbConn.Errors.Count > 0 Then
      Response.Write "<FONT SIZE=5><B>" & "Database Errors:" & "</B></FONT><P>"
     ' Response.Write "<B>" & "SQL Expression: " & "</B>" & SQL & "<P>"
	    For counter= 0 To dbConn.Errors.Count
	        Response.Write "<B>" & "Error Number: " & "</B>" & dbConn.Errors(Counter).Number & "<P>"
	        Response.Write "<B>" & "Error Descr: " & "</B>" & dbConn.Errors(Counter).Description & "<P>"
	    next
		
	end if
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform