I have a simple scraper. It works on some websites, but on some there is this Error:
Quote:
IOException was unhandled Unable to read data from the transport connection: The connection was closed
It is occuring at "Dim htmlresults As String = Urlcontents.ReadToEnd()".
'Create the HttpWebRequest object Dim req As HttpWebRequest = WebRequest.Create(URL) 'Set the timeout to 1 second (or 1,000 milliseconds) req.Timeout = 10000
I have a utility class that creates & returns a db connection: Public Shared Function GetConnection() as OracleConnection dim c as New OracleConnection() ... set connection string... c.Open() Return c End Function Is there any risk of concurrent calls returning the same connection? The connection string enables pooling.
From my understanding, .Net will pool SqlConnection objects where the Connection String is the same by default. Will the connection still be pooled if I call the Dispose method? This question is asked under the context of an ASP .Net application that at times makes many hits to the database in a single PageLoad event. I want the connections to be pooled, but would like confirmation that Closing and Disposing of the connection once the data operation is complete does not interfere with .Net's handling of the connection pool.
I just bought the MCTS Self-Paced Training Kit (Exam 70-561): Microsoft.NET Framework 3.5 - ADO.NET Application Development, and am trying to do the Lab Exercises now. Allready at the first exercise (point 8), where I am supposed to make an "UNIT TEST",[code]
I have a problem reading data from an RFID-reader. I connect to the reader by tcp and wait for DataAvailable to be true, then reading the data until I got a end of data character. Then I just go back and waiting for a new DataAvailable. This is done in a own thread for the function.
There seems to be some kind of timeout, If I don't got any data in a couple of minutes, then it just sits there in the do/loop waiting for DataAvailable. I hold the card to the RFID reader, it beeps, but there is no data available. I don't get any exeptions, and the information says that the clientsocket is still connected. Are there anything more I can check?
If I put the card to the reader in a minute-interval it seems as this will never occur. So 2-3 minutes idle:ing seems to do this.
Here are my code to read data from the socket, I have taken away some irrelevant code:
Sub test(ByVal ip As String, ByVal port As Integer) ' this sub is meant to run forever
i want to which way is better when concentration is on processing speed. i want to call a method that compute some data that method is on another form in my windows form application then what you prefer is better way 1) to call that method in another form and use returned value or create similar method in form where it is required.i want to make it's processing fast.
I got this Error Message while I try to preview the records in Dataset Designer:"The connection string could not be found or Data provider associated with the connection string could not be loaded"
I recently switched to V.Studio 2008 and using VB. I can not find in the data toolbox the connection and data adapters. Should I do something else to make this appear so I can drag them in my form.
Consider a MyForm class that contains a shadowed implementation of Show(). It also contains a CreateForm() method, which accepts an instance of the form and calls the shadowed sub:
I was looking for some stuff online, and i was looking through my reference sheets for vb.net, but it seems in the code i have found, there is declare in methods. Below is an example i am talking about. The thing is, that i dont recognize it and believe that it is an earlier version of Visual Basic ( 6 or earlier) which used it. Should i just keep looking for different code?
Public Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal _ lpSubKey As String, phkResult As Long) As Long
Goal: Find information on how to implement a method which will check if a certain DSN exists, and then if it does, extract the information and use the information for connection purposes.
I have been trying for days now how to create a process to the user to easily create a connection to any installed data types they have installed. I have found an example right inside vb2008. I never use this because I code my own connections, but this would be real nice if I could include it or duplicate it.
I'm trying to connect to a database that's defined in Windows control panel as a System DSN ODBC Data Source. The database is an Access mdb and I can't figure out how to get an OleDbConnection to reference it. All the Access drivers want me to point to the mdb file itself and I don't want to do that since the DB will be on a network eventually.
I'm developing a project for gathering customer feedback using a Samsung Q1 Ultra, a cheap touchscreen PC. The project consists of two parts: a PC based application that builds the survey and stores the info on an SQL Server, and a survey viewer on the Samsung device which downloads survey data from the SQL Server and stores it on a SQL Server Compact 3.5 database.
My question is, how best can I transfer survey data from the SQL Server to the handheld device's database? Writing a tonne of code to copy data from one database to another seems overcomplicated - is there a handy function or somesuch that I can use to copy data from identical tables on these two separate databases?
There is a system that needs to POST data to my site and all they asked for is for me to provide them with a URL. So I gave them my URL [URL]
Now I do not know exactly how they POST it but now on my Test.aspx page I need to write code that will save that data to a database.
But how would this work and what must I do on my Test.aspx page?
I wrote some code in my Page Load Event that sends me an email on Page Load to see if they actually hit the page and it does not seem like they are even?
How can I read data from a .csv file I have opened into a variable for later use (i.e. plotting with zedgraph)? My csv file contains 100+ columns and 12000+ rows of data, with each column a different variable.
I've searched around a ton on this subject, and combined many methods I found on the net to my project but none actually do what I am required to do.
I basically need to hold a lot of data - the structure is that of a five dimensional array holding integers.What would be the most efficient way of storing this in a file (I was thinking of XML - your opinion?) that would also be quick to extract.
We are about to have a situation where our application needs to accept/give data to another application. Both applications are residing on the same machine.Two approaches being talked about are using a local web service that will do this or using files that will be used to share all of this data.
I'm trying to add a new data connection to a SQL Server database that lives out on my network. When I add the new connection I get the "Choose Data Source" dialog but it only contains the following: Microsoft Access Database File Microsoft SQL Server Database File I don't see an option for a remote SQL database. How can I add that option to my list?
I verified data types that are being inserted to insure that this is my problem. I dont see any exception errors.Am i missing a veriable or something that is related to my connection.
I have developed small visual basic.windows forms application with VS2010 RC. I have a development SQL Server named RJHDEVELOP. I've added a data connection to this server and everything runs well. When I come to deploy it onto the factory server named CARRONSBS, how do I tell the deployment package I want to the dataconnection to be a different server name?
Does anyone here knows how to use the DTPicker and to bind data from it using ADO Connection? I need to know how to use it for my training. I looked up in the net but found only inappropriate answers.