Solved

VB Error connecting to MS SQL Server 2005 Express

Posted on 2010-08-22
13
344 Views
Last Modified: 2013-11-25
I'm Having Trouble
I installed MS SQL 2005 Express
and created the program in vb, the code is attached
When I click "connect" or connect
appears two errors
I Do Not Know Where I'm wrong
Other programs successfully connect in sql
But my mistakes Have
someone help me?
thanks
Form1.frm.txt
Testar.vbp.txt
Testar.vbw.txt
0
Comment
Question by:Oppital
  • 7
  • 6
13 Comments
 

Author Comment

by:Oppital
Comment Utility
0
 
LVL 41

Expert Comment

by:graye
Comment Utility
I'd check to make sure that the SQL Server 2005 Express Edition has been configured for network connectivity.   The default install does NOT enable network connection.
Take a look at the following (about 1/2 way down)
http://msdn.microsoft.com/en-US/library/ms345154(v=SQL.90).aspx
0
 

Author Comment

by:Oppital
Comment Utility
the problem is software
I am not able to do it communicate with the database
but using other programs can
0
 
LVL 41

Expert Comment

by:graye
Comment Utility
Take a look at these example connection strings...  The express edition typically has an "instance name" of SQLEXPRESS
http://www.connectionstrings.com/sql-server-2005
0
 

Author Comment

by:Oppital
Comment Utility
I tried the forms on this site, the ideal would be to try to find something in the code

thanks
0
 
LVL 41

Expert Comment

by:graye
Comment Utility
Well, we don't really have much to go on, since we can't see what values are being used to build the connection string.
Here is what I'd guess would be the correct connection string:
    SQL = "Provider=SQLNCLI;Data Source=" & Servidor.Text & "\SQLEXPRESS; Initial Catalog=" & BancoDados.Text & ";Password=" & Senha.Text & ";User ID=" & Login.Text & ";"
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:Oppital
Comment Utility
I found the solution
ip: xxxx \ SQLEXPRESS
and found new problem
how to make a vb6 program that connects to a database
ms sql server 2005 express
that runs on x84
run on computers with x64 windows 7?
0
 
LVL 41

Expert Comment

by:graye
Comment Utility
What kind of errors are you getting?
0
 

Author Comment

by:Oppital
Comment Utility
Run-time error '3706'

i'm use win 7 x64
0
 
LVL 41

Accepted Solution

by:
graye earned 500 total points
Comment Utility
OK, it looks like you need to install the 64-bit version of SQL Server 2005 "Native Client" on that PC
http://msdn.microsoft.com/en-us/library/ms131321(SQL.90).aspx
0
 

Author Comment

by:Oppital
Comment Utility
the problem is in software that is not working on x64, no with the database
0
 
LVL 41

Expert Comment

by:graye
Comment Utility
Error 3706 is all about the database provider... did you try it?
0
 

Author Closing Comment

by:Oppital
Comment Utility
good
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now