>Tech>ASP Suggerimenti su ASP
Venerdì, 19 Aprile 2024
 
  Qualche suggerimento sullo sviluppo con ASP.

1      Errore ASP 0178. 1

2      Utilizzare CDONTS su Windows XP. 3

3      Add, edit, delete a db with ADO.. 3

4      Problemi di HangUp con Norton. 9

5      Passaggio di parametri 10

6      Funzioni Utili 11

7      Come gestire il ritorno a capo. 11

8      Debug degli script ASP con Microsoft Script Debugger 11

9      Pulsanti di Form con IMMAGINI 12

10        Come leggere più valori postati 14

11        Le date in ASP e SQL. 14

 

 

1           Errore ASP 0178

Capita che quando si cerca di accedere ad un oggetto COM non si abbiano i privilegi sufficienti, allora la microsoft suggerisce di procedere come segue.

Oggetto Server, ASP 0178 (0x80070005)

Impossibile richiamare il metodo Server.CreateObject durante la verifica delle autorizzazioni. Impossibile accedere all'oggetto.

PRB: Server Object Error 'ASP 0178' Instantiating COM Object

--------------------------------------------------------------------------------

The information in this article applies to:

Microsoft Active Server Pages

Microsoft Internet Information Server versions 4.0, 5.0

--------------------------------------------------------------------------------

SYMPTOMS

When instantiating a COM component in an Out-Of-Process Server (EXE) from Active Server Pages (ASP), the following error may occur:

Server object error 'ASP 0178 : 80070005'

Server.CreateObject Access Error

testOOP.asp, line 12

The call to Server.CreateObject failed while checking permissions.

Access is denied to this object.

CAUSE

Appropriate permissions to access and launch the Out-Of-Process (OOP) COM object has not been set.

RESOLUTION

You need to give the IUSR_<machine_name> account permissions to launch and access your OOP COM object using dcomcnfg by doing the following:

Launch DCOMCNFG by clicking the Start button, selecting Run, and typing "Dcomcnfg" in the Run dialog box.

In the Default Security tab, click the "Edit Default" in the "Default Access Permissions" frame. The Registry Value Permissions dialog box appears.

Add the IUSR_<machine_name>account and the INTERACTIVE account to the Registry Value Permissions dialog box, and click OK.

In the Default Security tab, click the Edit Default in the Default Launch Permissions frame. The Registry Value Permissions dialog box appears.

Add the IUSR_<machine_name> account to the Registry Value Permissions dialog box0, and click OK.


Vai all'indice

2           Utilizzare CDONTS su Windows XP

 

In Windows XP Professional il componente CDONTS è stato rimosso, tuttavia esso può essere installato, e quindi utilizzato in qualsiasi applicazione ASP, copiando il file CDONTS.DLL da un sistema Windows NT o Windows 2000.

Ecco come procedere:
- da Windows NT o Windows 2000 copiare il file C:\winnt\system32\cdonts.dll nella cartella c:\windows\system32\ del sistema Windows XP.
- sempre dal sistema Window XP cliccare su Start > Esegui e scrivere "regsvr32 cdonts.dll"; battere invio.
- a questo punto il sistema dovrebbe comunicare la corretta registrazione del componente.
- basterà riavviare il PC e le applicazioni ASP che usano il CDONTS dovrebbero funzionare alla perfezione.

Attenzione: in questa nota si è fatto riferimento alle cartelle di installazione standard di Windows 2000 e Windows NT (c:\winnt\) e di Windows XP (c:\windows).

 

Vai all'indice

 

3           Add, edit, delete a db with ADO

 

In this tutorial you will learn how to add, edit , delete information in a ms access dbase with ado and asp.

 

In this tutorial we will learn how to add, edit , delete information in a ms access dbase with asp and ado. To get

things done you must have read/write permission on files.

 

First we have to make a access dbase with id(pk), name(text), email(text), date(date/time) and maybe

we should add one more a field with date/time to save edit date.

 

Next we make a display page for the records with hyperlink to the form/files for addnew, edit and

delete records in dbase script. Lets call the file show_me.asp.

<%

'declare some jobs

Dim Conn, RS, SQL

'sql statment to table tb where date is call t

SQL = "SELECT ID, name, email, t, new_t FROM

tb order by t, new_t desc"

Set Conn = Server.CreateObject("ADODB.Connection")

'ms access dsnless connection to the dbase

Conn.Open "DBQ=" & Server.Mappath("photo1.mdb") & ";

Driver={Microsoft Access Driver (*.mdb)};"

Set RS = Server.CreateObject("ADODB.Recordset")

RS.Open SQL, Conn

'lets looptrue the dbase records and display them

do while not RS.EOF

%>

<table cellpadding="2" cellspacing="2" border="0" width="90%">

<tr valign="Top">

<td valign="Top"><%= RS("id")%></td>

<td valign="Top"><%= RS("name")%></td>

<td valign="Top"><a href="mailto:<%= RS("email")%>">

<%= RS("email")%></a></td>

<td valign="Top">added:&nbsp;<%= RS("t")%><br>

last update:&nbsp;<%= RS("new_t")%></td>

<td valign="Top"><b>

<a href="edit_form.asp?method=edit&id=<%=rs("id")%>">edit</a> -

<a href="add_edit_delete_script.asp?method=delete&id=

<%=rs("id")%>">delete</a> -

<a href="add_new_form.asp">newpost</a></b></td>

</tr>

<%

RS.MoveNext

Loop

%>

</table>

<%

'Clean up...

RS.Close

Set RS = Nothing

Conn.Close

Set Conn = Nothing

%>

 

Next we need two forms, one for addnew record and one for edit excisting records. The addnew record form will be

hyperlink to the script add_edit_delete.asp etc. Lets call the file add_new_form.asp.

 

<form action="add_edit_delete_script.asp?

method=newone" method="post">

name<br>

<input type="text" name="name"><br>

email<br>

<input type="text" name="email"><br>

<input type="submit" name="submit">

 

So we now make the edit form where you have to retrive the info from the dbase to the form.

Let us call this file for edit_form.asp.

 

<%

id=request.querystring("id")

'declare some jobs

Dim Conn, RS, SQL

SQL = "SELECT ID, name, email, t FROM tb where id=" &id

Set Conn = Server.CreateObject("ADODB.Connection")

'ms access dsnless connection

Conn.Open "DBQ=" & Server.Mappath("photo1.mdb") & ";

Driver={Microsoft Access Driver (*.mdb)};"

Set RS = Server.CreateObject("ADODB.Recordset")

RS.Open SQL, Conn

%>

'so the form

<form action="add_edit_delete_script.asp?

method=edit&id=<%=rs("id")%>" method="post">

id<br><input type="text" name="id"

value="<% = Server.HTMLEncode(rs("id")) %>"><br>

name<br><input type="text" name="name"

value="<% = Server.HTMLEncode(rs("name")) %>"><br>

email<br><input type="text" name="email"

value="<% = Server.HTMLEncode(rs("email")) %>"><br>

posted<br><input type="text" name="t"

value="<% = Server.HTMLEncode(rs("t")) %>"><br>

<input type="submit" name="submit">&nbsp;&nbsp;<input type="Reset">

</form>

 

So finally we have to make the ado/asp script for add, edit , delete info in the dbase. I use the select case as method for the add, edit, etc instead of making 3 seperat files. Lets call the file for add_edit_delete_script.asp.  For reach the different operations you just add a ?method=delete when you hyperlink your forms.  Sub newone means you adding a new record from the form add_new_form.asp. You can download all the files in zip in top of page.

 

<%@Language=VBScript%>

<%Response.Buffer = True%>

<%

Dim Method

Method = Request.QueryString("method")

Select Case Method

Case "newone"

newone

Case "edit"

edit

Case "delete"

delete

End Select

'///////

Sub newone

name=request.form("name")

email=request.form("email")

Dim DataConn, CmdAddRec, SQL

Set DataConn = Server.CreateObject("ADODB.Connection")

Set CmdAddRec = Server.CreateObject("ADODB.Recordset")

DataConn.Open "DBQ=" & Server.Mappath("photo1.mdb") & ";

Driver={Microsoft Access Driver (*.mdb)};"

SQL = "SELECT tb.* FROM tb"

CmdAddRec.Open SQL, DataConn, 1, 3

CmdAddRec.AddNew

CmdAddRec.Fields("t") = DATE

CmdAddRec.Fields("name") = name

CmdAddRec.Fields("email") = email

CmdAddRec.Update

' closing objects and setting them to nothing

' not neccesary but a good habit

CmdAddRec.Close

Set CmdAddRec = Nothing

DataConn.Close

Set DataConn = Nothing

Response.redirect "show_me.asp"

End Sub

'//////////////

Sub edit

id=request.querystring("id")

name=request.form("name")

email=request.form("email")

Dim DataConn, CmdUpdateRec, MYSQL

Set DataConn = Server.CreateObject("ADODB.Connection")

Set CmdUpdateRec = Server.CreateObject("ADODB.Recordset")

DataConn.Open "dsn=db4"'"DBQ=" & Server.Mappath("photo1.mdb") & ";

Driver={Microsoft Access Driver (*.mdb)};"

MYSQL = "SELECT tb.* FROM tb WHERE (ID = " & ID & ")"

CmdUpdateRec.Open MYSQL, DataConn, 1, 3

CmdUpdateRec.Fields("name") = name

CmdUpdateRec.Fields("EMAIL") = EMAIL

CmdUpdateRec.Fields("new_t") = DATE

CmdUpdateRec.Update

CmdUpdateRec.Close

Set CmdUpdateRec = Nothing

DataConn.Close

Set DataConn = Nothing

Response.redirect "show_me.asp"

End Sub

'///////

Sub delete

varID = Request.QueryString("ID")

Dim DataConn, CmdDeleteRec, MYSQL

Set DataConn = Server.CreateObject("ADODB.Connection")

Set CmdDeleteRec = Server.CreateObject("ADODB.Recordset")

DataConn.Open "dsn=db4"'"DBQ=" & Server.Mappath("photo1.mdb") & ";

Driver={Microsoft Access Driver (*.mdb)};"

MYSQL = "DELETE FROM tb WHERE (ID = " & varID & ")"

CmdDeleteRec.Open MYSQL, DataConn

DataConn.Close

Set DataConn = Nothing

Response.redirect "show_me.asp"

End Sub

'///////

 

Vai all'indice


4           Problemi di HangUp con Norton

PRB: Antivirus Software Causes FileSystemObject Calls to Hang IIS

--------------------------------------------------------------------------------

The information in this article applies to:

Microsoft Active Server Pages

--------------------------------------------------------------------------------

SYMPTOMS

When you browse an Active Server Pages (ASP) page that contains FileSystemObject calls, the request for that page stops responding (hangs) and eventually times out in the browser.

CAUSE

This problem occurs because the Script Blocking feature in Norton AntiVirus software blocks scripting operations that access the file system, such as FileSystemObject. Although this problem is prevalent in Active Server Pages (ASP) Web applications, it can also occur in other technologies, such as Windows Scripting.

NOTE: This problem occurs even if Norton AntiVirus has been disabled.

RESOLUTION

To resolve this problem, contact Norton AntiVirus Software Support. The following Symantec Web site describes how to remove the Script Blocking feature:

http://service1.symantec.com/SUPPORT/nav.nsf/aab56492973adccd8825694500552355/399a443be88ce25788256a0e0068e180?OpenDocument

NOTE: You may have to reboot the server after you make the above-mentioned changes to the Norton AntiVirus software.

The third-party contact information included in this article is provided to help you find the technical support you need. This contact information is subject to change without notice. Microsoft in no way guarantees the accuracy of this third-party contact information.

Additional query words: hang fail Anti-Virus iis 5

Keywords : kbASP kbScript kbSecurity kbWebServer kbGrpDSASP kbDSupport kbFSO

Issue type : kbprb

Technology : kbAudDeveloper kbASPsearch

Alla Norton suggeriscono di disabilitare la protezione dagli script, aprire l'antivirus e disabilitarli (riavviare la macchina altrimenti non funziona).

 


 

Vai all'indice

5           Passaggio di parametri

 

Dalla riga di comando con ?id_q=casa....

Id_q = request.querystring("id_q")

Id_q = Request("id_q")

dal post di un form

 registrazione = request.form("REGISTRAZIONE")

 nuova= request.form("nuova")

 elimina = request.form("elimina")

 nonelimina = request.form("nonelimina")

 


 

Vai all'indice

 

6           Funzioni Utili

 

<script LANGUAGE="VBScript" RUNAT="Server">

FUNCTION CheckString (s, endchar)

            ' controlla se esiste l'apostrofo e nel caso ne aggiunge uno

            pos = InStr(s, "'")                    

            While pos > 0

                        s = Mid(s, 1, pos) & "'" & Mid(s, pos + 1)

                        pos = InStr(pos + 2, s, "'")

            Wend

   CheckString="'" & s & "'" & endchar

END FUNCTION

</script>

 

Vai all'indice

7           Come gestire il ritorno a capo

Quando usiamo un input di tipo text multilinea ci può interessare riconoscere quando l'utente inserisce dei ritorno a capo e sostituirli con un <br> per poi stampare il contenuto dell'input in una pagina html. Ecco la soluzione in VBScript:

 

<%

Dim Testo

Testo = Request.QueryString("miotesto")      'Riceviamo il testo

Testo = Replace(Testo, VbCrLf, "<br>")       'Sostituiamo i ritorni a capo

%>

 

VbCrLf è una costante VBScript che indica appunto il carattere di fine riga e ritorno a capo.

 

Vai all'indice

8           Debug degli script ASP con Microsoft Script Debugger

 

Probabilmente la maggior parte di voi conoscerà Microsoft Script Debugger, ovvero l'applicazione di default per il debug degli script lato client (tipicamente Javascript). E' possibile anche utilizzare Microsoft Script Debugger per eseguire il debug di script ASP lato server con IIS 4 o successivi.
Per prima cosa è necessario abilitare la modalità di debug lato server per una certa directory virtuale: apriamo il Pannello di controllo e scegliamo Strumenti di Amministrazione, quindi IIS; selezioniamo la voce Proprietà della directory virtuale desiderata, quindi Configurazione --> Debug Applicazioni e da qui spuntiamo la casella 'Abilita debug script ASP lato server'. A questo punto la directory virtuale è abilitata per il debug; se il debugger gira correttamente, sarà lanciato automaticamente durante l'esecuzione di un file .asp contenente un errore.

E' possibile richiamare il Debugger in diversi modi: (le voci dei menù potrebbero differire a seconda delle versioni del software in uso)
- manualmente da Programmi --> Accessori --> Microsoft Script Debugger
- manualmente da Internet Explorer, menù Visualizza --> Script Debugger --> Apri
- in maniera programmata, inserendo nel codice asp una o più istruzioni stop (ricordiamoci di rimuoverle prima di distribuire il file)
- selezionando dal menù Visualizza di IE la voce Interrompi alle prossime istruzioni
- automaticamente - come anticipato - tutte le volte che viene incontrato un errore di sintassi/compilazione o di runtime

Se abbiamo aperto manualmente il debugger, usiamo la finestra Running Documents per selezionare il file .asp; questa mostrerà un menù espandibile contenente i vari documenti correntemente aperti in Internet Explorer, simile a quello in figura. Espandendo la voce Microsoft Active Server Pages troviamo i file ASP di recente esecuzione; selezionando un file asp viene mostrato il codice in modalità di sola lettura (dovremo quindi usare un editor per modificare il file) su cui è possibile impostare punti di interruzione (breakpoint), i quali hanno lo stesso effetto delle istruzioni stop inserite manualmente nel codice.

Se abbiamo impostato un punto di interruzione (o una istruzione stop nel codice), chiamando il file .asp nel browser, l'esecuzione del documento si fermerà in corrispondenza dell'interruzione (puo' essere utile disabilitare il buffering dell'output con <%response.buffer=false%> in modo che venga visualizzata la parte di html processata prima dell'interruzione) e nel Debugger sarà evidenziata la riga che ha generato l'interruzione. Dalla finestra 'Command Window' del debugger possiamo quindi digitare righe di comando per leggere - e eventualmente modificare - i valori assunti in quel momento dalle variabili o proprietà degli oggetti; il linguaggio che useremo sarà lo stesso utilizzato nello script; nel caso di VBScript, per visualizzare il valore di una variabile o proprietà useremo il punto interrogativo, ad esempio:
? request.form ("cognome")
Per procedere nell'esecuzione clicchiamo su Run oppure usiamo Step Into per avanzare nell'esecuzione una istruzione alla volta.
Se l'interruzione è dovuta invece ad un errore nello script, il Debugger evidenzierà la linea che genera l'errore, accompagnata dal relativo messaggio di errore; dovremo quindi correggere il codice tramite editor e aggiornare il documento nel browser.
Per maggiori dettagli rimando alla documentazione Microsoft (lingua inglese).

 

Vai all'indice

 

9           Pulsanti di Form con IMMAGINI

 

SCRIVI.ASP

 

<html>

<head>

<title>SCRIVI</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body bgcolor="#FFFFFF" text="#000000">

 

<form name="form1" method="post" action="LEGGI.ASP">

 

<input type="image" border="0" name="PIPPO" src="00/000/images/addnew.gif">

 

<input type="image" border="0" name="PLUTO" src="00/000/images/delete.gif">

 

 

LEGGI.ASP

 

</form>

</body>

</html>

 

<html>

<head>

<title>LEGGI</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

 

<body bgcolor="#FFFFFF" text="#000000">

 

<%

 

pippo = REQUEST.FORM("PIPPO.x")

if pippo <> "" then pippo = "Y"

pluto = request.form("PLUTO.x")

if pluto <> "" then pluto ="Y"

 

RESPONSE.WRITE "PIPPO =" & pippo & "<br>"

RESPONSE.WRITE "PLUTO =" & pluto & "<br>"

 

%>

</body>

</html>

 

In pratica si sfrutta l'input type IMAGE, questo oggetto restituisce le coordinate X e Y relative all'immagine alla pagina destinataria del form, è sufficiente verificare se rende qualcosa per sapere quale immagine è stata cliccata.

 

 

Vai all'indice


10       Come leggere più valori postati

 

for each item in request.form

     if mid(item,1,3) = "key" then

         codice = mid(item,4,2)

     end if       

next

response.write "Il codice è:" & codice

 

In questo pezzo di codice si leggono tutti i valori postati e se il nome di uno di questi inizia con "key" allora prendo il codice che considero il terzo e quarto valore.

 

 

11       Le date in ASP e SQL

 

Dopo la brutta esperienza con Aruba che, per colpa di Microsoft (secondo un arubiano), cambiava, fra le altre cose, il formato delle date, ho pensato di non usare più il tipo date nelle mie pagine.

Tutte le date le trasformo in stringhe "ungheresi", cioè nel formato giustamente adottato dall'ANSI che permette l'ordinamento: AAAAMMGGhhmmss.

Per fare questo ho sostituito le funzioni di VBScript.

Poichè io (non ho la pretesa di insegnare ad altri, ma sto semplicemente 'raccontando' le mie soluzioni!) ho due esigenze diverse ho creato due pagine di funzioni da includere nelle normali ASP che utilizzano le date e tutti i campi che dovrebbero essere di tipo data/ora dei miei archivi .mdb o SQL sono di tipo testo.

 

fn_strData.asp

 

Nelle funzioni incluse in questo file utilizzo il punto come separatore delle varie parti perchè mi permette di usare la funzione split().

 

Le funzioni sono:

 

sDataStr - Trasforma la data di sistema (in qualsiasi formato essa sia) nella stringa AAAA.MM.GG.hh.mm.ss. Esempio 01-12-1900  23:59:59 ->: 1900.12.01.23.59.59

 

sStrData(sData) - Estrae una data in formato ANSI dalla stringa AAAA.MM.GG.hh.mm.ss. Esempio: sStrData("1900.12.01.23.59.59") riporta 1900 12 01

 

sStrDataOra(sData) - Estrae data e ora in formato ANSI dalla stringa AAAA.MM.GG.hh.mm.ss. Esempio: sStrDataOra("1900.12.01.23.59.59") riporta 1900 12 01 23:59:59

 

sStrDataIta(sData) - Estrae una data in formato Italiano "breve" dalla stringa AAAA.MM.GG.hh.mm.ss. Esempio: sStrDataIta("1900.12.01.23.59.59") riporta 01-12-1900

 

sStrDataOraIta(sData) - Estrae data e ora in formato italiano "breve" dalla stringa AAAA.MM.GG.hh.mm.ss. Esempio: sStrDataOraIta("1900.12.01.23.59.59") riporta 01-12-1900 23:59:59

 

sStrLDataIta(sData) - Estrae una data in formato Italiano "lungo" dalla stringa AAAA.MM.GG.hh.mm.ss. Esempio: sStrDataIta("1900.12.01.23.59.59") riporta 01-dic-1900

 

sStrLDataOraIta(sData) - Estrae data e ora in formato italiano "lungo" dalla stringa AAAA.MM.GG.hh.mm.ss. Esempio: sStrDataOraIta("1900.12.01.23.59.59") riporta 01-dic-1900 23:59:59

 

<%

 

Function sDataStr

 sDataStr= _

 right("19" & cStr(Year(Date)),4) & "." & _

 right("00" & cStr(Month(Date)),2) & "." & _

 right("00" & cStr(Day(Date)),2) & "." & _

 right("00" & cStr(Hour(Time)),2) & "." & _

 right("00" & cStr(Minute(Time)),2) & "." & _

 right("00" & cStr(Second(Time)),2)

end function

 

Function sStrData(sData)

 asData=Split(sData,".",3)

 sStrData = asData(0) & " " & _

   asData(1) & " " &   asData(2)

end function

 

Function sStrDataOra(sData)

 asData=Split(sData,".")

 sStrDataOra = asData(0) & " " & _

  asData(1) & " " & asData(2) & _

  asData(3) & ":" & asData(4) & ":" & asData(5)

end function

 

Function sStrDataIta(sData)

asDataIta=Split(sData,".",3)

sStrDataIta = asDataIta(2) & "-" & _

  asDataIta(1) & "-" & asDataIta(0)

end function

 

Function sStrDataOraIta(sData)

asDataIta=Split(sData,".")

sStrDataOraIta = asDataIta(2) & "-" & _

 asDataIta(1) & "-" & asDataIta(0) & _

 asDataIta(3) & ":" & asDataIta(4) & ":" &_

 asDataIta(5)

end function

 

Function sStrLDataIta(sData)

 asDataIta=Split(sData,".",3)

 sStrLDataIta = asDataIta(2) & "-" &_

  MonthName(asDataIta(1),true) & "-" & _

  asDataIta(0)

end function

 

Function sStrLDataOraIta(sData)

 asDataIta=Split(sData,".")

 sStrLDataOraIta = asDataIta(2) & "-" & _

  MonthName(asDataIta(1),true) & "-" & _

  asDataIta(0) & asDataIta(3) & ":" & _

  asDataIta(4) & ":" & asDataIta(5)

end function

 

%>

 

fn_dAnsi.asp

 

Le funzioni incluse in questo file, invece, trasfomano il tempo di sistema (data e ora) in una stringa formato ANSI "puro", cioè senza separatori (se ricordo bene le norme ISO prevedono uno spazio)

 

Le funzioni sono:

 

DataAnsi(SysDate) - Riporta la stringa: AAAAMMGG

DataOraAnsi(SysNow) - Riporta la stringa: AAAAMMGGhhmmss

Anno(SysDate) - Riporta l'anno

Mese(SysDate) - Riporta il mese

Giorno(SysDate) - Riporta il giorno

Ora(SysNow)

Minuti(SysNow)

Secondi(SysNow)

Data() - Riporta la data nel formato: AAAA-MM-GG

Tempo() - Riporta l'ora nel formato: hh:mm:ss

<%

 

Function DataAnsi(SysDate)

 DataAnsi= _

   right("19" & cStr(Year(SysDate)),4) & _

   right("00" & cStr(Month(SysDate)),2) & _     

   right("00" & cStr(Day(SysDate)),2)

end function

 

Function DataOraAnsi(SysNow)

 DataOraAnsi= _

  right("19" & cStr(Year(SysNow)),4) & _

  right("00" & cStr(Month(SysNow)),2) & _

 right("00" & cStr(Day(SysNow)),2) & _

  right("00" & cStr(Hour(SysNow)),2) & _

 right("00" & cStr(Minute(SysNow)),2) & _

  right("00" & cStr(Second(SysNow)),2)

end function

 

Function Anno(SysDate)

 Anno=cInt(mid(DataANSI(SysDate),1,4))

end function

 

Function Mese

 Mese=cInt(mid(DataANSI(SysDate),5,2))

end function

 

Function Giorno(SysDate)

 Giorno=cInt(mid(DataANSI(SysDate),7,2))

end function

 

Function Ora(SysNow)

 Ora=cInt(mid(DataOraANSI(SysNow),9,2))

end function

 

Function Minuti(SysNow)

 Minuti=cInt(mid(DataOraANSI(SysNow),11,2))

end function

 

Function Secondi(SysNow)

 Secondi=cInt(mid(DataOraANSI(SysNow),13,2))

end function

 

Function Data

 Data=dateSerial(Anno,Mese,Giorno)

end function

 

Function Tempo

 Tempo=timeSerial(Ora,Minuti,Secondi)

end function

 

%>

 

 
Salcino
Stefano Salcino - Home Page
Stefano
Chi Sono | Portfolio | Gallery | Linee Guida | Utility | Tech | Servizi | Area Riservata | Contact
Questa pagina è stata visitata 9363 volte dal 20 luglio 2004