473,387 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

A question about accessing an SQL Server db

Hi Folks,

First, thank you guys for being so patient with me as I ask so many
questions during the development of this application. I have yet
another question. This time, about accessing an SQL Server dbs and
first chance exceptions. So, here goes...

I am wanting to access an SQL Server db. So, in my declaration
section, I have the following:

Imports System.Data
Imports System.Data.SqlClient

When I try to build the project and before any other code I wrote is
run, the system is kicking out three first chance exceptions on these
lines. They all say the same thing:

"A first chance exception of type 'System.Data.SqlClient.SqlException'
occurred in System.Data.dll"

I know what first chance exceptions are and I would not have a problem
if they were thrown against my code. But this seems to be thrown
agains the Imports statements? I can't really catch these exceptions
(I'd rather eliminate them anyway) so I am at a loss as to what to do.

Can anyone clue me in?

Thanks!
Anthony
Sep 14 '08 #1
1 900
So it looks like I solved this. It was all because of a bad connection
string. Took me 4 hours, lots of Google searches, and enough bad
language to make a sailor blush. But damnit I solved it!

The final connection string that worked was:

Dim sConnectionString As String = "Data Source=.
\SQLEXPRESS;AttachDbFilename='C:\Program Files\Microsoft SQL Server
\MSSQL.1\MSSQL\Data\pemr.MDF';Integrated Security=True;Connect
Timeout=30;User Instance=True"

God DAMN that was rough!!
Sep 14 '08 #2

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

Similar topics

4
by: Jaydeep | last post by:
Hello, I am facing a strange problem. Problem accessing remote database from ASP using COM+ server application having VB components (ActiveX DLL) installed. Tier 1 : ASP front End (IIS 5.0) Tire...
1
by: Amy Tseng | last post by:
Hi, I am having a problem accessing SQL Server 2000 via UNIX. I am accessing SQL Server 2000 from Solaris using Sybase Open Client (CT-Lib). Here is the error message: CT-LIBRARY error:...
3
by: prodirect | last post by:
Hi all, I hope someone can help me. I've recently created a database and wanted to put it up on an ftp sight so that multiple people could access the same tables at the same time from different...
2
by: Kevin | last post by:
I'm beginning to get into ASP.NET and don't know much about it yet. I just need to know first about the way to access a SQL Server database. SQL Server is running on a server inside our network...
4
by: Khalique | last post by:
I have built a web service whose purpose is to copy files from a secure place to client machine and vice versa. The problem I am having is perhaps related to permissions and access rights. For...
3
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : ...
3
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web...
3
by: Nathan Sokalski | last post by:
I have a validator that I wrote by inheriting from BaseValidator. At certain points in the code, I need to access other controls on the page containing the validator. I have the IDs of these...
2
by: sukatoa | last post by:
I doubt if this is the right section to post... But, for a clarification I always use "jdbc:mysql://localhost:3306/dbname" to access the mysql database server given also the username and the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...

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.