mercoledì 28 luglio 2021

Installare odbc oracle su w10

 Visionare i seguenti link

https://docs.oracle.com/en/database/oracle/machine-learning/oml4r/1.5.1/oread/installing-oracle-database-instant-client.html#GUID-A0AAF57E-D74F-43F1-BD92-81D197EFE17F

Creare la seguente cartella in C

c:\oml4rclient_install_dir

Scaricare "Oracle Instant Client Downloads for Microsoft Windows (x64) 64-bit" dalla pagina https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html (vedi immagine 1)
Il file zip contiene una cartella instantclient_xx_yy che va copiata nella cartella appena creata

Andare su 
  • panello di controllo 
  • Sistema
  • Impostazioni di sistema avanzate
  • variabili di ambiente
Creare la variabile OCI_LIB64 impostando il valore c:\oml4rclient\instantclient_12_1.
Nella variabile PATH aggiungere c:\oml4rclient\instantclient_12_1.

Estarre il contenuto e posizionarlo sulla cartella instantclient
Lanciare odbc_install.exe

creare l'odbc
scegliere Oracle in istantclient
sul campo TNS service name, mettere il nome che si trova all'interno del file tnnames.ora





















martedì 11 maggio 2021

passare caratteri accentati e speciali nella chiamata ajax

convertire il parametro data tramite la funzione encodeURI


mioUrl = "./page2/pagina.asp";

mioData =   "nome=città" 

mioData = encodeURI(mioData);

 //eseguie il comando ajax

$.ajax({  

url: mioUrl,  

type: "POST",  

data: mioData,

dataType: "html",

success: function(msg) {  

$("div#" + nomeDiv ).html(msg);  

},

error: function(){

alert("Chiamata fallita!!!");

} 

}); 

venerdì 16 aprile 2021

Carta hype, scaricare giacenza media

 Premi sui tre pallini in basso a destra

Premi su "profilo" in alto a destra

Premi su "Giacenza media" (circa a metà pagina, si trova nella sezione Profilo personale)

mercoledì 14 aprile 2021

Visual Studio, aprire file excel

 Sui riferimenti aggiungere "Microsoft Excel 16.0 Object Library"




codice


Public Class Form1

    Dim oExcel As Microsoft.Office.Interop.Excel.Application

    Dim oBook As Microsoft.Office.Interop.Excel.Workbook

    Dim oSheet As Microsoft.Office.Interop.Excel.Worksheet

    Dim raXL As Microsoft.Office.Interop.Excel.Range

    Private Sub BtnApriExcel_Click(sender As Object, e As EventArgs) Handles BtnApriExcel.Click

        ' Start Excel and get Application object.

        oExcel = CreateObject("Excel.Application")

        oExcel.Visible = True

        ' open a workbook.

        oBook = oExcel.Workbooks.Open("D:\DiscoD\pgmVS\Gru_pcs_2_D13\elencoPCSD13.xlsx")

        oSheet = oBook.ActiveSheet

        ' Start Excel and get Application object.

        oExcel = CreateObject("Excel.Application")

        oExcel.Visible = True

        ' Add a new workbook.

        oBook = oExcel.Workbooks.Add

        oSheet = oBook.ActiveSheet

        ' Add table headers going cell by cell.

        oSheet.Cells(1, 1).Value = "testo"

        ' Format A1:D1 as bold, vertical alignment = center.

        oSheet.Range("A1", "I1").Font.Bold = True

    End Sub

End Class






venerdì 22 gennaio 2021

SQL ottenere il valore MAX di più colonne


ecco il testo sql

select   cognome , nome

,(select max(v) from ( values (cognome) , (nome) )  AS MyTable(v) ) as tt

from persone