Pagina 3 di 8 primaprima 1 2 3 4 5 ... ultimoultimo
Visualizzazione dei risultati da 21 a 30 su 71
  1. #21
    Utente di HTML.it
    Registrato dal
    Nov 2005
    Messaggi
    395
    guarda l'allegato ecco cosa mi dice in access type mismatch
    Immagini allegate Immagini allegate

  2. #22
    Utente di HTML.it
    Registrato dal
    Nov 2005
    Messaggi
    395
    ciao ho fatto come mi hai detto ecco la query ma il problema e' che non gli arrivano i parametri ecco tutto il codice.....

    <%@LANGUAGE = VbScript
    %>

    <%
    'connection to database ("mdb/database")
    dim conn
    Set Conn=Server.CreateObject("ADODB.Connection")

    strConn="driver={Microsoft Access Driver (*.mdb)}; "
    strConn=strConn & " DBQ=" & Server.MapPath("mdb/database.mdb")
    strConn=strConn & ";pwd=innovatel"
    strConn= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("mdb/database.mdb")
    conn.Open strConn
    'this function find staff.name where Area.idArea = vid
    function extractname(vid, title)
    sql = "SELECT Area.IdArea, Level.Level, Staff.Name, Staff.Position, Staff.IdStaff " _
    & " FROM [Level] INNER JOIN (Area INNER JOIN Staff ON Area.IdArea = Staff.AreaCode) ON Level.IdPosition = Staff.LevelCode " _
    & " WHERE (((Area.IdArea)="&vid&")) " _
    & "ORDER BY Level.Level;"
    'queryarea select to every staff.name own area
    sql = "SELECT * FROM QueryArea "_
    & " WHERE (((IdArea)="&vid&")) " _
    & "ORDER BY IdArea, Level.Level;"
    ' create recordset and start to write the table structure with dates
    dim rs
    Set rs = Server.CreateObject("ADODB.Recordset")


    rs.Open sql, conn ,3,3

    'dim nome
    'nome= request.QueryString("[Staff].[Name]")
    'response.Write(nome)
    'response.End()
    'strSQL = "select COUNT(read) AS totaleRecord FROM MessageBoard"
    'strSQL = "select * from querylucaread"

    'strSQL = "SELECT MessageBoard.IdMessageBoard, MessageBoard.Mittente, MessageBoard.Read FROM MessageBoard WHERE ((MessageBoard.Mittente)="luca") AND ((MessageBoard.Read)=No));"
    'strSQL = "select * from queryNoRead"
    'strSQL = "SELECT Staff.Name FROM [Staff] WHERE (((IdArea)="&vid&"))"
    strSQL = "SELECT MessageBoard.IdMessageBoard,MessageBoard.Destinata rio,MessageBoard.Read, Staff.Name" _
    & "FROM [MessageBoard] INNER JOIN Staff ON MessageBoard.Destinatario = Staff.Name " _
    & "WHERE MessageBoard.Read = 'No';"

    response.Write(strSQL)
    response.end
    Set rs1 = Server.createObject("ADODB.Recordset")

    rs1.Open strSQL, conn ,3,3


    response.write "<table align='center' width='150' cellpadding='1' cellspacing='0' style='border: Solid 1px #000000;'>"
    response.write"<tr bgcolor='#FF0000' border='1'>"
    response.write"<td colspan='2'>"
    response.write""
    response.write title
    response.write"
    "
    response.write "</td>"
    response.write"</tr>"


    response.write"<tr bgcolor='#CCCCCC' border='1'>"
    response.write"<td width='60' align='left'>Name"
    response.write"</td>"
    response.write"<td width='90' align='left'>Position"
    response.write"</td>"
    response.write"<td>"
    response.write"record"
    response.write"</td>"
    response.write"</tr>"


    do while not(rs.eof)
    response.write"<tr border='1'>"
    response.write"<td>"
    response.write"<a href = 'details.asp?idreq="&rs.fields("IdStaff")&"' target='right'>"'right
    response.write rs.fields("name")
    response.Write"</a>"

    response.write"</td>"
    response.write"<td>"
    response.write rs.fields("position")
    response.write"</td>"
    response.write"<td>"
    ' Stampa il risultato
    'Response.Write("Nel database sono presenti ")

    ' Ecco il risultato del conteggio
    'Response.Write(objRs("totaleRecord"))
    'Response.Write(" record in totale.")
    Response.Write "" & rs1.RecordCount & ""
    response.write"</td>"
    response.write"</tr>"
    rs.movenext
    loop
    response.write"</table>"
    rs.close
    set rs=nothing

    rs1.Close
    Set rs1 = Nothing
    end function

    'this function find position of every staff.name where Area.idArea = vid
    function extractposition(vid)

    sql = "SELECT Area.IdArea, Level.Level, Staff.Name, Staff.Position, Staff.IdStaff " _
    & " FROM [QueryArea] INNER JOIN (Area INNER JOIN Staff ON Area.IdArea = Staff.AreaCode) ON Level.IdPosition = Staff.LevelCode " _
    & " WHERE (((Area.IdArea)="&vid&")) " _
    & "ORDER BY Area.IdArea, Level.Level;"
    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.Open sql, conn ,3,3
    do while not(rs.eof)
    response.write rs.fields("position") &"
    "

    rs.movenext
    loop

    rs.close
    set rs=nothing

    end function

    %>
    <html>
    <head>
    <SCRIPT LANGUAGE="JavaScript1.1">

    <!-- Begin
    function right(e) {
    if (navigator.appName == 'Netscape' &&
    (e.which == 3 || e.which == 2))
    return false;
    else if (navigator.appName == 'Microsoft Internet Explorer' &&
    (event.button == 2 || event.button == 3)) {
    alert("Sorry, Disability Right Click!");
    return false;
    }
    return true;
    }
    document.onmousedown=right;
    if (document.layers) window.captureEvents(Event.MOUSEDOWN);
    window.onmousedown=right;
    // End -->

    </script>

    <script language="JavaScript1.2">
    <!--hide
    var isnMonth = new
    Array("Genuary","Febbrary","March","April","May"," June","July","Agust","September","October","Novemb er","Dicember");
    var isnDay = new
    Array("Sunday","Monday","Tuesday","Wendsday","Thur sday","Friday","Saturday","Sunday");
    today = new Date () ;
    Year=today.getYear();
    Date=today.getDate();
    if (document.all)
    document.title="Hi. Today \is: "+isnDay[today.getDay()]+", "+Date+" "+isnMonth[today.getMonth()]+" "+Year+""
    //--hide-->
    function apri(url) {
    newin = window.open(url,'title','scrollbars=auto,resizable =yes, width=400,height=400,status=no,location=no,toolbar =no');
    }
    </script>


    <title>Organization Chart</title>
    <style type="text/css">
    td, p, input, textarea { font-size: 10 px; font-family: Verdana; }
    a { color: #000080; text-decoration: None; }
    a:hover { color: #800000; text-decoration: Underline; }
    .style1 {font-size: 8px}
    .style2 {font-size: 10px; color:red}
    </style>
    </head>
    <body>
    <table width="779">


    <tr>

    <td colspan="2" rowspan="2" valign="top"><%extractname 1,"1 Director"
    %></td>
    <td height="22" colspan="5" valign="top">[img]images/barra.gif[/img]</td>
    </tr>
    <tr>

    <td width="148" rowspan="1" valign="top"><%extractname 2,"2 Administration"
    %> </td>
    <td width="148" rowspan="2" valign="top"> <%extractname 3,"3 Sales"
    %>
    </td>


    <td width="148" rowspan="3" valign="top"><%extractname 4,"4 Service"
    %> </td>

    <td width="148" rowspan="3" valign="top"><%extractname 5,"5 Customer Service"
    %> </td>
    <td width="1"></td>
    </tr>
    <%
    conn.Close
    set conn = Nothing
    'connection to db is close now
    %>
    <%

    dim conn1
    Set Conn1=Server.CreateObject("ADODB.Connection")

    strConn1="driver={Microsoft Access Driver (*.mdb)}; "
    strConn1=strConn1 & " DBQ=" & Server.MapPath("mdb/database.mdb")
    strConn1=strConn1 & ";pwd=innovatel"
    strConn1= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("mdb/database.mdb")
    conn1.Open strConn1

    'querycompany select to Espresso Italia
    sql = "SELECT *All From QueryCompany "
    %>

    <tr>
    <td width="115" rowspan="1" valign="top">[img]images/espressologo100.gif[/img]</td>
    <td width="27" height="19"></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td height="42"></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td height="4"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td height="38"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    </tr>
    </table>
    </body>
    </html>

    Qualche idea?

  3. #23
    Utente di HTML.it
    Registrato dal
    Nov 2005
    Messaggi
    395
    HELP ME PLEASE !!!!!!!!!!!

  4. #24
    MessageBoard.Read è un campo di tipo...?

  5. #25
    Utente di HTML.it
    Registrato dal
    Nov 2005
    Messaggi
    395
    tipo si o no, ma il problema e' che non riconosce l'uguglianza tra:MessageBoard.Destinatario = Staff.Name
    due campi testo!
    che ne dici?

  6. #26
    tipo si/no è booleano. prova a mettere 0 (zero), senza apici, invece di 'No' nella where

  7. #27
    Utente di HTML.it
    Registrato dal
    Nov 2005
    Messaggi
    395
    provato no cambia niente.....

  8. #28

  9. #29
    Utente di HTML.it
    Registrato dal
    Nov 2005
    Messaggi
    395
    eccola....

    strSQL = "SELECT MessageBoard.IdMessageBoard, MessageBoard.Destinatario, MessageBoard.Read FROM [MessageBoard] INNER JOIN Staff ON MessageBoard.Destinatario = Staff.Name WHERE MessageBoard.Read = 0"

  10. #30
    Utente di HTML.it L'avatar di Gioba66
    Registrato dal
    Jun 2002
    Messaggi
    2,189
    a che serve la inner join con staff se poi non usi mai la tabella staff?
    Tutti vogliono parlare, nessuno sa ascoltare.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.