473,323 Members | 1,622 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,323 software developers and data experts.

Connection Help

I am doing some lessons on a book and when connecting to a database supplied I
sometimes get this error:

Playing with the System.Data.SqlClient.SqlConnection

When I click on the ConnectionString property, and click on New Connection,
I browse for my mdf file,
click on "Use Windows Authentication" and click on
Test Connection.

I get this error:
This connection cannot be tested because no server name has been specified.

So then I click on "Advanced", and click the dropdown box of the Data Source
and put ".\SQLEXPRESS" into it.

Now clicking "OK", I click on "Test Connection" one more time.
I now get a new error.
Cannot open user default database. Login failed.
Login failed for user 'MIRO\Miro Nagy'
Can anyone let me know what property I am missing to get this connection to work,
either in a setup somewhere or another property.

I cant seem to figure out why it works sometimes - and other times not.

Thanks,

Miro
Nov 20 '07 #1
1 1004
Its the User Instance, but im not sure as to why this setting being "False"
would give me my error.

Miro wrote:
I am doing some lessons on a book and when connecting to a database
supplied I
sometimes get this error:

Playing with the System.Data.SqlClient.SqlConnection

When I click on the ConnectionString property, and click on New Connection,
I browse for my mdf file,
click on "Use Windows Authentication" and click on
Test Connection.

I get this error:
This connection cannot be tested because no server name has been specified.

So then I click on "Advanced", and click the dropdown box of the Data
Source
and put ".\SQLEXPRESS" into it.

Now clicking "OK", I click on "Test Connection" one more time.
I now get a new error.
Cannot open user default database. Login failed.
Login failed for user 'MIRO\Miro Nagy'
Can anyone let me know what property I am missing to get this connection
to work,
either in a setup somewhere or another property.

I cant seem to figure out why it works sometimes - and other times not.

Thanks,

Miro
Nov 20 '07 #2

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

Similar topics

3
by: Harry | last post by:
Using Oracle 8i enterprise on win 2000 (sp3) Installed the standard configuration & whenever I make a connection it takes about 10 secs. It's running on a P1900 with 1gb Ram so no reason there...
5
by: Fred Zuckerman | last post by:
Hello All, After reading in this group about the preference for connecting to a SQL Server using a connection string instead of a DSN file, I have done just that. BUT, I cannot update my data....
2
by: Jozef | last post by:
Hello, I'm trying to create a central function that runs a connection to an SQL Server database. The connection etc works, but when I try to call it, I get an error saying "Runtime-Error 91:...
4
by: Rahul Anand | last post by:
Getting SQL Exception when trying to implement Connection based Trasaction using SQL Helper class. I am using the follwing function to execute my stored procs: -=-=-=- ExecuteScalar(ByVal...
7
by: greg | last post by:
Hi We have w2k, iis5, .NET/c# I periodically receive this message and the system freezes ++++++++++++++++++++++++++++++++++++++++++++++++++ Timeout expired. The timeout period elapsed...
6
by: Sharon | last post by:
Hi all. I'm trying first time async socket connection. In all the examples i've seen, the server connection is closed when the message is complete. Is it common to close the connection after...
7
by: momo | last post by:
Hello to all, I need some help. I am looking for a database connection function that I can use in my ASP.NET site. This would be in VB.NET. What I want to be able to do is call the function and...
10
by: rich | last post by:
I have a PHP5 application that accepts external messages, and inserts them into a database. It's rather high traffic.. the server could be receiving thousands at a time, and recently mysql has...
20
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.