473,811 Members | 3,300 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ODBC Problems

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!
Nov 18 '05 #1
1 1032
CompilerOptions is Page directive attribute so you need to put it with
the Page directive. As the error message says you can't declare more
then one page directive on a page.

<%@ Page Language="VB" CompilerOptions ='/R:"C:\Program
Files\Microsoft .NET\Odbc.Net\M icrosoft.data.o dbc.dll"'%>
<%@ import Namespace="Syst em.Data" %>
<%@ import Namespace="Micr osoft.Data.ODBC " %>
<script runat="server">
HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6789
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used the SQL Profile to watch the T-SQL-Command which Access ( who creates the commands?) creates and noticed:
1
2147
by: rguti | last post by:
Anybody know when the new version of the ODBC Driver is gonna be out? I'm using 3.51.11-1, but I'm having problems transferring information from SQL Server. Thanks.
2
2252
by: uli2003wien | last post by:
Dear group, we are dealing with some very specific problems with ODBC, where a connection from SQL-Server to Mysql works with ODBC-driver 3.51.10.00 and does NOT work with ODBC-driver 3.51.11.00. Maybe someone experiences similar problems or even has a solution ? Some feedback (to the group) would be highly appreciated. We use a Microsoft SQL-Server as Headquarter database and some Mysql-machines on Redhat as satellite-databases. We...
3
5586
by: Ian | last post by:
We are currently experiencing problems with our Access XP database. We are using access as the front-end and are connecting to Oracle 7.3 via ODBC. Our users are running Win 98 and Win Xp. We are currently using Oracle73 drivers ver:1.15.03.01 File: SQ032.73.dll Date:18/06/1996. The Problem, I can re-link the Oracle tables and open them within access, However the tables take around a minute to open. When I try to run a query I receive...
0
2390
by: Julia Baresch | last post by:
Everyone, I posted the message below back in February and didn't get any information. I also wasn't able to find any documentation in MS Help, web site, or other groups. I'm posting now with results of my research in case anyone else might need this information. I consulted with my MIS colleague, and he said it would be ok to have each merge file pull the whole database when the criteria screen is opened. His reasoning was that it...
9
17040
by: mcbill20 | last post by:
Hello all. I just installed Oracle 10g developer tools on a machine running XP Pro and Office XP. Before this I had just the Oracle 9 client installed. I the previous configuration, I was able to access any of the Oracle tables on another machine but now I am having problems. Unfortunately, I don't remember the correct syntax for the ODBC connect string and I am hoping that is my whole problem. I am trying to connect to an Oracle 9...
2
9954
by: Crazy Cat | last post by:
Hi all, I am having trouble getting linked Oracle 9 server in MS SQL Server 2005 Express to work properly. My machine is running Windows XP. The Microsoft and Oracle OLE DB Providers have problems dealing with Oracle's Numeric Data Type, so I decided to use Microsoft's OLE DB for ODBC Provider and an Oracle ODBC source. When using the Microsoft ODBC for Oracle Driver in my ODBC source I have inconsistent behavior. Sometimes my queries...
3
7992
by: nolanmadson | last post by:
I'm creating a front-end for some Teradata user maintenance tables in MS Access. I've started having problems in occasionally not being able to insert or update records in these tables. I've been able to create the Teradata tables, link to them via ODBC and then insert or update in MS Access. However, in subsequent sessions have not been able to do so. In another instance a colleague created tables, I was able to make entries. She had to...
16
9193
by: network-admin | last post by:
We have Problems with Access query on Oracle 10g Database with ODBC Connection. The Query_1 is such as select * from xtable where ycolumn <"S" Result = ODBC Faild ----------------------------------------------------
8
8987
by: Phil Reynolds | last post by:
We are using SQL Server as a back end to an Access front end on a LAN using ODBC linked tables. Users are periodically getting the "data has been changed by another user" error, and it's causing them to have to re-enter a lot of data. The ODBC refresh interval has been left at the default (1500 sec) on all computers. I'm wondering if maybe changing that to a much smaller number (150 seconds?) would help alleviate the problem. Also, I'm...
0
10652
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10395
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7673
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6895
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5561
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5700
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4346
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3874
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3026
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.