Solved

VB Error connecting to MS SQL Server 2005 Express

Posted on 2010-08-22
13
348 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
ID: 33498170
0
 
LVL 41

Expert Comment

by:graye
ID: 33501560
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
ID: 33501954
the problem is software
I am not able to do it communicate with the database
but using other programs can
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 41

Expert Comment

by:graye
ID: 33502272
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
ID: 33502491
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
ID: 33503340
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
 

Author Comment

by:Oppital
ID: 33507421
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
ID: 33509834
What kind of errors are you getting?
0
 

Author Comment

by:Oppital
ID: 33511835
Run-time error '3706'

i'm use win 7 x64
0
 
LVL 41

Accepted Solution

by:
graye earned 500 total points
ID: 33512410
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
ID: 33514230
the problem is in software that is not working on x64, no with the database
0
 
LVL 41

Expert Comment

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

Author Closing Comment

by:Oppital
ID: 34174814
good
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL replication over high latency link 10 61
SQL Log size 3 20
Update one table with results from another table in SQL 6 28
SQL Availablity Groups List 2 8
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

830 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