Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with script
Message
From
09/11/2005 09:43:38
 
General information
Forum:
Internet
Category:
Active Server Page
Miscellaneous
Thread ID:
01066693
Message ID:
01066763
Views:
15
Use On Error Resume Next for debugging purposes and the Response object to output messages directly to the page. (Response.Write) Also use the Err object to check for errors. (err.number, err.description, etc.)

Once you've got things working you can remove debugging code.

>I am very new to asp programming. I have a page where i get data from a table and i can modify them. I open my connection
>
>
><%
>
>cId = Request.QueryString("Id")
>
>' creazione dell'oggetto di connessione ADODB
>Set dbconn = Server.CreateObject("ADODB.Connection")
>
>' indicazione della connessione odbc sul server
>dbconn.ConnectionString =Application("Aupd_connectionstring")
>dbconn.Open Application("dbconn_RuntimeUserName"),Application("DbConn_RuntimePassword")
>
>SQLQuery= "SELECT Usrs.Id, Usrs.psw, Usrs.Cli, Usrs.Mail, Usrs.Tipo, Usrs.Area, Usrs.Act " & _
>"From Usrs " & _
>"Where Id='" & cId & "' " & _
>"order by Id"
>
>Set RS=dbconn.Execute(SQLQuery)
>
>
>then i write my data using html commands
>At the end of my page i have a button and i create a btnsave_onclick function
>
>
><script LANGUAGE="vbscript">
>Sub btnsave_onclick
>
>dbconn = CreateObject("ADODB.Connection")
>dbconn.ConnectionString =Application("Aupd_connectionstring")
>dbconn.Open Application("dbconn_RuntimeUserName"),Application("DbConn_RuntimePassword")
>
>SQLQuery= "Update Usrs Set Cli='" & Trim(CodApp.Value) & "', Psw='" & Trim(Password.Value) & "'," & _
>"Mail='" & Trim(Mail.Value) & "' " & _
>"Where Id='" & trim(Codice.Value) & "'"
>msgbox(SQLQuery)
>dbconn.Execute(SQLQuery)
>window.Close
>End Sub
></script>
>
>
>The problems are that in this function some vb commands are not correct or are not executed and i can use Application variables from file global.asa. If i exclude all the commands and leave only the window.close command the function is executed so the problem is in the syntax i use.
>Someone can help me ? i have to save data and i need to understand which kind of commands to use and how can access the variables stored in global.asa and the difference between source in sub function and that in <% at the top of my asp page when i open the table and run a query.
>
>Thanks in advance......
Previous
Reply
Map
View

Click here to load this message in the networking platform