Hi all, I know this is not really a laserfiche's question, but maybe someone already did it and help me?
From Laserfiche Form, I saved records in my database (under mssql) ; each record refers to a Laserfiche form.
Using html (aspx), I want to make a list's page from my database but I don't know aspx.
This is my database
And this is what I want
I tried this code (aspx) but unsucces.
<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Data
Dim oDR as System.Data.SQLClient.SQLDataReader
Dim oCom As System.Data.SQLClient.SqlCommand
Dim oConn as System.Data.SQLClient.SQLConnection
Try
'Enter the database server address, initial catalog(database name),
'uid(username) and pwd(password) in the line below
oConn = New System.Data.SQLClient.SQLConnection ("server=USER1\LASERFICHE; initial catalog=Mydatabase;uid=USER1\Olivier;pwd=Mypassword;")
oConn.Open()
oCom = New System.Data.SQLClient.SqlCommand()
oCom.Connection = oConn
'Enter your SQL query within the quotes in the line below
oCom.CommandText = "SELECT * FROM dbo.Poste_a_pourvoir"
oDR = oCom.ExecuteReader()
While oDR.Read
'Enter a column name within the quotes below for each item
Response.Write(oDR.Item("specialite_recherchee") & ", " & oDR.Item("poste_a_pourvoir"))
Response.Write("<BR/>")
End While
Catch
Response.Write("Error:" & err.Description)
Finally
oDR = Nothing
oCom = Nothing
oConn.Close()
oConn = Nothing
End Try
End Sub
</script>
<html>
<title>Queries from the MS-SQL database with ASP.NET</title>
<body bgcolor="FFFFFF">
<h2>Query from table <b>products</b> with ASP.NET</h2>
<%Page_Data()%>
</body>
</html>
This is the error
The login is correct! I use it with Mssql Management Studio with no problem.
Thank you in advance.
Regards