Kod mog fajla:
Code:
<%@ Page Language="VB" Debug="true" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Web" %>
<HTML>
<script language="VB" runat="server">
Sub Page_Load(Src as object, E as EventArgs)
Dim MyConnection as SQLConnection
Dim MyCommand as SQLCommand
Dim MySQLQuery as String
Dim Id as String
Id=Request.QueryString("Id")
MyConnection = New SQLConnection("server=MSSQL2KDE; uid=sa; pwd=sa; database=test")
MySQLQuery = ("SELECT * FROM Proizvodi WHERE id = " & Id)
MyCommand = New SQLCommand("GetArtikalPriceCheckerMK", MyConnection)
MyCommand.CommandType = CommandType.StoredProcedure
Dim pIdBroj as New SQLParameter("@IdBroj", SQLDBType.NVarChar, 14)
Dim pRezultat as New SQLParameter("@rezultat", SQLDBType.NVarChar, 50)
pIdBroj.Direction = ParameterDirection.Input
pRezultat.Direction = ParameterDirection.Output
myCommand.Parameters.Add(pIdBroj)
myCommand.Parameters.Add(pRezultat)
MyConnection.Open()
MyCommand.executeNonquery()
With myCommand
Rezultat.Text = .Parameters("@rezultat").Value.ToString()
End With
MyConnection.Close()
End Sub
</script>
<%@ Page Language="VB" Debug="true" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Web" %>
<HTML>
<script language="VB" runat="server">
Sub Page_Load(Src as object, E as EventArgs)
Dim MyConnection as SQLConnection
Dim MyCommand as SQLCommand
Dim MySQLQuery as String
Dim Id as String
Id=Request.QueryString("Id")
MyConnection = New SQLConnection("server=MSSQL2KDE; uid=sa; pwd=sa; database=test")
MySQLQuery = ("SELECT * FROM Proizvodi WHERE id = " & Id)
MyCommand = New SQLCommand("GetArtikalPriceCheckerMK", MyConnection)
MyCommand.CommandType = CommandType.StoredProcedure
Dim pIdBroj as New SQLParameter("@IdBroj", SQLDBType.NVarChar, 14)
Dim pRezultat as New SQLParameter("@rezultat", SQLDBType.NVarChar, 50)
pIdBroj.Direction = ParameterDirection.Input
pRezultat.Direction = ParameterDirection.Output
myCommand.Parameters.Add(pIdBroj)
myCommand.Parameters.Add(pRezultat)
MyConnection.Open()
MyCommand.executeNonquery()
With myCommand
Rezultat.Text = .Parameters("@rezultat").Value.ToString()
End With
MyConnection.Close()
End Sub
</script>
Dole idu asp Labele za prikazivanje itd...
Puno hvala na pomoći!