Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Local vs. normal development
Message
De
07/03/2003 15:41:27
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00762896
Message ID:
00762985
Vues:
33
Try writing CartID and strSQL to the Response for debugging purposes. What's on CartID in this particular instance?

>Hi everybody,
>
>I'm now trying to test my application on-line (we put my pages on the site) as opposed to doing them locally.
>
>This is my loca connection string:
>
>' Having it as a function would be easy to change
>Function GetShoppingCartStrConn()
> GetShoppingCartStrConn= "Driver={SQL SERVER};SERVER=NADYA;DATABASE=ShoppingCart;UID=;PWD=;"
>end function
>
>And this is the on-line (I strip the last part) and don't show the IP:
>GetShoppingCartStrConn = "Provider=SQLOLEDB; Server=our actual IP; database=CreditRecs; network=DBMSSOCN;
>
>=================================
>Here is the error, I got:
>Microsoft OLE DB Provider for SQL Server error '80040e14'
>
>Incorrect syntax near the keyword 'order'.
>
>/creditrecords/ViewCartDetail.asp, line 41
>
>=================
>And this is the code: (works fine locally with local connection string):
>
>
><%@language=vbscript  
><%option explicit  
><!-- #include file = "SetConnections.asp" -->
><!-- #include file = "ShoppingCartFunctions.asp" -->
><html>
><head>
><title>View Cart Content</title>
><!-- #include file = "selections.js" -->
></head>
><body bgcolor="#ffffff">
><!-- #include file = "DynamicMenu.html" -->
><%
>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
>
>
>There line 41 is the last line (I don't show the actual form output, since it's unrelevant here).
>
>Do you know, what is the problem? Could it be, that SQLOleDB is more strict to the syntax.
>
>Thanks in advance.
>
>Here is a link, BTW http://twg-dev-dq.thewarrengroup.com/creditrecords/FormResult.asp
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform