Hi all gurus,
I'm getting a strange behaviour in Web services design: when I try to open a
connection, or to fill a DataSet, I get the error in subj (totally unrelated
to the actual error). I've tried SQL Server connection, SSPI integrated or
not, OledB (mdb) connection with enclosed password in the connection string,
but I get consistently the same error. I've even tried to
deinstall/reinstall Framework (1.1 SP1), IIS (5.1), S.O.(WXp SP2) HotFixes
and recovering VisualStudio 2003, with no luck. This issue is driving me
nut, pls can some1 give me a clue?
In the following code, error rises on "...Connection. Open", and then I
receive the error page, while the execution never reaches the "Return"
statement, nor the "Try" one.
Code snippet:
<WebMethod()> _
Public Function Test() As DataSet
OleDbConnection 1.Open()
Return DataSet11
Try
Catch ex As Exception
Dim errore As String = ex.ToString
errore = ""
End Try
End Function 4 3640
you should always open sql connections inside a try block.
OleDbConnection conn = new OleDbConnection ()
conn.Connection String = "connection string here"
Try
conn.Open()
Catch ex As Exception
Console.WriteLi ne(ex.Message)
Finally
conn.Close()
End Try
HTH,
John Scragg
"Saverio Tedeschi" wrote: Hi all gurus, I'm getting a strange behaviour in Web services design: when I try to open a connection, or to fill a DataSet, I get the error in subj (totally unrelated to the actual error). I've tried SQL Server connection, SSPI integrated or not, OledB (mdb) connection with enclosed password in the connection string, but I get consistently the same error. I've even tried to deinstall/reinstall Framework (1.1 SP1), IIS (5.1), S.O.(WXp SP2) HotFixes and recovering VisualStudio 2003, with no luck. This issue is driving me nut, pls can some1 give me a clue?
In the following code, error rises on "...Connection. Open", and then I receive the error page, while the execution never reaches the "Return" statement, nor the "Try" one.
Code snippet: <WebMethod()> _
Public Function Test() As DataSet
OleDbConnection 1.Open()
Return DataSet11
Try
Catch ex As Exception
Dim errore As String = ex.ToString
errore = ""
End Try
End Function
Thank you, John, 4 your reply.
However, even if what you say is surely true, the "Try" block should catch
exception, and it does not. Why?
Furthermore, this is only a simple sample, 'cause I always get this error,
and my real app is quitly more complicated than the snippet I've posted. Now
I'm trying to de-install and reinstall VS2003, and all related components,
even if I've already performe a "refresh" of the previous install. ?????
"John Scragg" <Jo********@dis cussions.micros oft.com> ha scritto nel
messaggio news:12******** *************** ***********@mic rosoft.com... you should always open sql connections inside a try block.
OleDbConnection conn = new OleDbConnection () conn.Connection String = "connection string here" Try conn.Open() Catch ex As Exception Console.WriteLi ne(ex.Message) Finally conn.Close() End Try
HTH,
John Scragg
"Saverio Tedeschi" wrote:
Hi all gurus, I'm getting a strange behaviour in Web services design: when I try to open a connection, or to fill a DataSet, I get the error in subj (totally unrelated to the actual error). I've tried SQL Server connection, SSPI integrated or not, OledB (mdb) connection with enclosed password in the connection string, but I get consistently the same error. I've even tried to deinstall/reinstall Framework (1.1 SP1), IIS (5.1), S.O.(WXp SP2) HotFixes and recovering VisualStudio 2003, with no luck. This issue is driving me nut, pls can some1 give me a clue?
In the following code, error rises on "...Connection. Open", and then I receive the error page, while the execution never reaches the "Return" statement, nor the "Try" one.
Code snippet: <WebMethod()> _
Public Function Test() As DataSet
OleDbConnection 1.Open()
Return DataSet11
Try
Catch ex As Exception
Dim errore As String = ex.ToString
errore = ""
End Try
End Function
The Try block will only catch exceptions thrown within the bock. you are
calling .Open() on your connection outside of the try block.
I think you are barking up the wrong tree by trying to reinstall all you
apps, OS and database. You are more likely to introduce a new bug then you
are to solve this one.
Put you .Open() inside the try block, put a break point on the code in your
catch block and see what you get. I am sure that if you are getting an error
thrown by .Open() you will catch it there.
John
"Saverio Tedeschi" wrote: Thank you, John, 4 your reply. However, even if what you say is surely true, the "Try" block should catch exception, and it does not. Why? Furthermore, this is only a simple sample, 'cause I always get this error, and my real app is quitly more complicated than the snippet I've posted. Now I'm trying to de-install and reinstall VS2003, and all related components, even if I've already performe a "refresh" of the previous install. ?????
"John Scragg" <Jo********@dis cussions.micros oft.com> ha scritto nel messaggio news:12******** *************** ***********@mic rosoft.com... you should always open sql connections inside a try block.
OleDbConnection conn = new OleDbConnection () conn.Connection String = "connection string here" Try conn.Open() Catch ex As Exception Console.WriteLi ne(ex.Message) Finally conn.Close() End Try
HTH,
John Scragg
"Saverio Tedeschi" wrote:
Hi all gurus, I'm getting a strange behaviour in Web services design: when I try to open a connection, or to fill a DataSet, I get the error in subj (totally unrelated to the actual error). I've tried SQL Server connection, SSPI integrated or not, OledB (mdb) connection with enclosed password in the connection string, but I get consistently the same error. I've even tried to deinstall/reinstall Framework (1.1 SP1), IIS (5.1), S.O.(WXp SP2) HotFixes and recovering VisualStudio 2003, with no luck. This issue is driving me nut, pls can some1 give me a clue?
In the following code, error rises on "...Connection. Open", and then I receive the error page, while the execution never reaches the "Return" statement, nor the "Try" one.
Code snippet: <WebMethod()> _
Public Function Test() As DataSet
OleDbConnection 1.Open()
Return DataSet11
Try
Catch ex As Exception
Dim errore As String = ex.ToString
errore = ""
End Try
End Function
Lot of thanks, John.
Actually, there's an authorization issue with default user. For some reason,
the authorizations used till 10 days ago are no more valid and now I'm
trying a new schema.
"John Scragg" <Jo********@dis cussions.micros oft.com> ha scritto nel
messaggio news:6F******** *************** ***********@mic rosoft.com... The Try block will only catch exceptions thrown within the bock. you are calling .Open() on your connection outside of the try block.
I think you are barking up the wrong tree by trying to reinstall all you apps, OS and database. You are more likely to introduce a new bug then you are to solve this one.
Put you .Open() inside the try block, put a break point on the code in your catch block and see what you get. I am sure that if you are getting an error thrown by .Open() you will catch it there.
John
"Saverio Tedeschi" wrote:
Thank you, John, 4 your reply. However, even if what you say is surely true, the "Try" block should catch exception, and it does not. Why? Furthermore, this is only a simple sample, 'cause I always get this error, and my real app is quitly more complicated than the snippet I've posted. Now I'm trying to de-install and reinstall VS2003, and all related components, even if I've already performe a "refresh" of the previous install. ?????
"John Scragg" <Jo********@dis cussions.micros oft.com> ha scritto nel messaggio news:12******** *************** ***********@mic rosoft.com... > you should always open sql connections inside a try block. > > OleDbConnection conn = new OleDbConnection () > conn.Connection String = "connection string here" > Try > conn.Open() > Catch ex As Exception > Console.WriteLi ne(ex.Message) > Finally > conn.Close() > End Try > > HTH, > > John Scragg > > "Saverio Tedeschi" wrote: > >> Hi all gurus, >> I'm getting a strange behaviour in Web services design: when I try to >> open a >> connection, or to fill a DataSet, I get the error in subj (totally >> unrelated >> to the actual error). I've tried SQL Server connection, SSPI >> integrated >> or >> not, OledB (mdb) connection with enclosed password in the connection >> string, >> but I get consistently the same error. I've even tried to >> deinstall/reinstall Framework (1.1 SP1), IIS (5.1), S.O.(WXp SP2) >> HotFixes >> and recovering VisualStudio 2003, with no luck. This issue is driving >> me >> nut, pls can some1 give me a clue? >> >> In the following code, error rises on "...Connection. Open", and then I >> receive the error page, while the execution never reaches the "Return" >> statement, nor the "Try" one. >> >> Code snippet: >> <WebMethod()> _ >> >> Public Function Test() As DataSet >> >> OleDbConnection 1.Open() >> >> Return DataSet11 >> >> Try >> >> Catch ex As Exception >> >> Dim errore As String = ex.ToString >> >> errore = "" >> >> End Try >> >> End Function >> >> >> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ben |
last post by:
hi
when I try to excecute an ASP (either JS or VB) script to
say, access a database record, I get an Internal Server
Error HTTP 500.100
Why? and HOW CAN I FIX THIS?
Thanks
|
by: Rene |
last post by:
Hi,
I'm spend many hour to fix this problem, read many articles about it but no
article gave a solution.
To isolate the problem I've created in IIS6 (WServer2003) a virtual
directory test to the local C:\test, in this directory I have index.htm and
test.asp (just a simple Response.Write "TEST").
Opening the server/test/index.htm show the page, server/test/test.asp gives
|
by: Patrick Masson |
last post by:
Hello,
Our configuration :
Apache 2.0.53
PHP 5.0.4
PC Windows 2000
MATLAB 6.1
We work on a consulting project in France which involves MATLAB Web server,
|
by: Rod |
last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some
reason, opening some ASP.NET applications we wrote is producing the
following error message:
"The Web server reported the following error when attempting to create or
open the Web project located at the following URL:
'http://localhost/WebApplication1'. 'HTTP/1.1 500 Internal Server Error'."
|
by: Bruce Schechter |
last post by:
I just started to develop an ASP.NET application in vs.net 2003 . But each
time I try to execute the application (which is basically empty so far), I
get a dialog box titled "Microsoft Development Environment" with this
message:
"Error while trying to run project: Unable to start debugging on the web
server. Server-side error occurred on sending debug HTTP request.
Make sure the server is operating correctly. Verify there are no...
| |
by: mfeingold |
last post by:
I am working on a system, which among other things includes a server and a
..net control sitting in an html page and connected to the server. I ran into
a couple of problems, you guys might have some insight about.
1) It takes 20 sec or so to open a tcp socket from the client to the server.
It just sits in the TcpClient.conect waiting for something. When I run the
same control from a windows application it connects right away and works...
|
by: Yelena Varshal |
last post by:
Hello,
I am using ODBC to access Microsoft Access database. I use just generic ADO
code. I don't have problems opening multiple connections from the same page
on the development server but the same code does not work on the production
server and on my Windows XP workstation running IIS. One connection opens
fine on the production server and on my workstation. But as soon as I add a
second connection I am getting an error:
Error Type:
|
by: Frinavale |
last post by:
The following article is directed at people who are experiencing an HTTP/1.1 500 Internal Server Error while using Visual Studio 2003.
The error message typically sounds something like:
The web server reported the following error when attempting to create or open the Web Project located at the Following URL:http://localhost/Webapplication1’.HTTP/1.1 500 Internal Server Error’.
This error tends to rear it's ugly head when you're creating...
|
by: kuguy |
last post by:
Hi all,
I'm new to the forums, so I hope this isn't in the wrong place...
I have that "Software caused connection abort: socket write error" exception error that i've never meet before.
Basically what im trying to do is the following:
- a client connect to a server using sslsocket.
- server receive the connection and reply with the first part of the data and keep the connection open.
- then client receive the reply and request for...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |