22 messaggi dal 16 ottobre 2014
Ciao,
la tabella che posto è solo un misero estratto.
Adesso controllo quello che mi hai detto di controllare.
Grazie,
ciao
22 messaggi dal 16 ottobre 2014
Allora, scusa (mi fuma la testa), ricapitoliamo: io ho creato un file così:

"
Dim Prezzo As String = Request.QueryString("Prezzo")
Dim SQLString As String
SQLString = "SELECT ShopCart.OrdineNo, ShopCart.OrdineData, ShopCart.Codice As Codice, Articoli.Nome" & lingua & " as Description, ShopCart.ItemQuantity as Quant, " & _
"Articoli.PrezzoT" & Prezzo & " as Prezzo, Articoli.Incr" & Prezzo & " As Incr, Articoli.Collooriginale As StPck FROM ShopCart, Articoli where ShopCart.Codice = Articoli.Codice " & _
"And OrdineNo = '" & OrdineNo & "' UNION SELECT ShopCart.OrdineNo, ShopCart.OrdineData, ShopCart.Codice As Codice, QdispoSchede1.DescEstesa As Description, ShopCart.ItemQuantity as Quant, " & _
"QdispoSchede1.Prezzo As Prezzo, Articoli.IncrEuroPB As Incr, Qdispochede1.QtaMinimaOrd As StPck FROM Articoli, ShopCart, QdispoSchede1 where ShopCart.Codice = QdispoSchede1.codice " & _
"And OrdineNo = '" & OrdineNo & "'"
System.IO.File.AppendAllText(Server.MapPath("/public/query.txt"), vbCrLf & DateTime.Now.ToString() & vbTab & SQLString)
ShopCartSource.SelectCommand = SQLString
"

che ho salvato come query,txt e che ho caricato via ftp sul server nella cartella public (creata a sua volta visto che non c'era)

Questa riga

System.IO.File.AppendAllText(Server.MapPath("/public/query.txt"), vbCrLf & DateTime.Now.ToString() & vbTab & SQLString)

devo forse aggiungerla nella stessa posizione nell pagina dove c'è questa SQLStrinb oppure no. L'ho anche fatto, ma mi ha dato:

erver Error in '/' Application.

Access to the path 'E:\users\albertisrl\www.alberti.it\htdocs\public\query.txt' is denied.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path 'E:\users\albertisrl\www.alberti.it\htdocs\public\query.txt' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in File Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:


Line 57: "QdispoSchede1.Prezzo As Prezzo, Articoli.IncrEuroPB As Incr, QdispoSchede1.QtaMinimaOrd As StPck FROM Articoli, ShopCart, QdispoSchede1 where ShopCart.Codice = QdispoSchede1.codice " & _
Line 58: "And OrdineNo = '" & OrdineNo & "'"
Line 59: System.IO.File.AppendAllText(Server.MapPath("/public/query.txt"), vbCrLf & DateTime.Now.ToString() & vbTab & SQLString)
Line 60: ShopCartSource.SelectCommand = SQLString
Line 61:

Source File: E:\users\albertisrl\www.alberti.it\htdocs\ShopCartR.aspx Line: 59
"


E comunque, il file query.txt nella cartella public rimane inalterato.

Dove sbaglio?
Grazie ancora,
ciao,
Maura
22 messaggi dal 16 ottobre 2014
Ciao Manuel,
ho controllato: non c'è nessun valore nullo nel campo prezzo, e neppure per il campo incr.
Sorry,
Maura
Mi sembra molto strano...
Prova a cambiare da Decimal a Object in
Function Get_Amount(ByVal Prezzo As Decimal, ByVal Quant As Integer, ByVal StPck As Integer, ByVal Incr As Decimal)
controllare se sono nulli e in tal caso impostarli a zero.
Vedrai che funziona.

Ormai programmano tutti... ma la professionalità appartiene a pochi
22 messaggi dal 16 ottobre 2014
Ricevo questo:
É un problema nativo di validazione, ho risolto con un'altra funzione:
http://blog.rebuildall.net/2011/03/02/jquery_validate_and_the_comma_decimal_
separator

da Andrea <zingoni, ma il link non dà nulla.
Chi mi può aiutare>?
Grazie
M. Castellani
11.886 messaggi dal 09 febbraio 2002
Contributi
Ciao Maura,


devo forse aggiungerla nella stessa posizione nell pagina dove c'è questa SQLStrinb oppure no. L'ho anche fatto, ma mi ha dato:
Server Error in '/' Application.
Access to the path 'E:\users\albertisrl\www.alberti.it\htdocs\public\query.txt' is denied.

Sì, l'hai messa correttamente. L'errore dipende dal fatto che il sito non riesce a scrivere sul file query.txt.
Te l'avevo fatto mettere nella cartella public perché di solito, su Aruba, quella cartella è scrivibile.

Comunque, vai a dare i permessi di scrittura al file query.txt seguendo questa guida di Aruba.
https://guide.hosting.aruba.it/hosting/windows/servizi-inclusi-creazione-sito-web/permission-manager-menu-file-manager.aspx
Guarda il video, lo vedi al minuto 0:40.

Resta quest'ultimo passo da fare, poi nel file query.txt riuscirai a vedere le query che vengono inviate al db.

ciao,
Moreno
Modificato da BrightSoul il 18 settembre 2017 23.57 -

Enjoy learning and just keep making
22 messaggi dal 16 ottobre 2014
Grazie, scusa, non avevo letto la tua risposta. Proverò a vedere, anche se il sito non è più ospitato su Aruba.
Maura

Torna al forum | Feed RSS

ASPItalia.com non è responsabile per il contenuto dei messaggi presenti su questo servizio, non avendo nessun controllo sui messaggi postati nei propri forum, che rappresentano l'espressione del pensiero degli autori.