I'm trying to test my ODBC connection. I need to use ODBC because of the
application restrictions. As per Microsoft directions for the known ODBC
error, I created a bin folder in my application directory. I'm assuming
my application directory is where I have my .ASPX page, right? I'm
getting the error:
There can be only one 'page' directive. Help appreciated.
<%@ Page Language="VB" %>
<%@ import Namespace="Syst em.Data" %>
<%@ CompilerOptions ='/R:"C:\Program
Files\Microsoft .NET\Odbc.Net\M icrosoft.data.o dbc.dll"' %>
<%@ import Namespace="Micr osoft.Data.ODBC " %>
<script runat="server">
Sub Page_Load(sourc e As Object, E As EventArgs)
Dim cn as OdbcConnection
cn = New OdbcConnection
("dsn=SOTAMAS90 AUTO;uid=TRY;pw d=Turux;")
Dim mystring As String = "Select * AR1_CustomerMas ter"
Dim cmd As OdbcCommand = New OdbcCommand(mys tring)
cn.Open()
MsgBox("Connect ed")
cn.Close()
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<!-- Insert content here -->
</form>
</body>
</html>
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!