SQL 2008 CONEXAO

JAMESBOND007 02/06/2010 15:19:06
#343710
tenho um banco de dados em sql 2008 certo como eu faço a conexão dos dois ?
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;

o que falta?
JWCELYO 02/06/2010 15:23:08
#343711
Amigo JAMESBOND007 explique melhor o que você que fazer.
JAMESBOND007 02/06/2010 15:24:03
#343712
quero liga o vb6 ao sql so isso, perguntei qual devo usar? e se faltava alguma linha de codigo abras
JWCELYO 02/06/2010 15:26:48
#343714
[txt-color=#0000f0]SQL Server Native Client 10.0 ODBC Driver[/txt-color]
Driver={SQL Server Native Client 10.0};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
[txt-color=#0000f0]
SQL Server Native Client 10.0 OLE DB Provider[/txt-color]
Provider=SQLNCLI10;Server=myServerAddress;Database=myDataBase;Uid=myUsername; Pwd=myPassword;
JAMESBOND007 02/06/2010 15:28:25
#343716
não tem nenhuma variavél que faz a ligação?
tipo public conexao as new ...
JAMESBOND007 02/06/2010 15:32:36
#343718
e qual componente eu uso? ado 2.8?
JAMESBOND007 02/06/2010 15:39:39
#343719
iria ficar assim?

[txt-color=#0000f0]Dim[/txt-color] conexao [txt-color=#0000f0]As New[/txt-color] ADODB.Connection
[txt-color=#0000f0]Public Sub[/txt-color] conectar_banco()
[txt-color=#0000f0]Dim [/txt-color]stringdeconexao [txt-color=#0000f0]As String[/txt-color]
stringdeconexao = [Ô]Data Source=c:\Arquivos de programas\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL;Initial Catalog=CHECKLIST;User Id=myUsername;Password=myPassword;[Ô]
conexao.Open stringdeconexao
[txt-color=#0000f0]End Sub[/txt-color]
TECLA 02/06/2010 21:53:34
#343765
Citação:

:
iria ficar assim?

[txt-color=#0000f0]Dim[/txt-color] conexao [txt-color=#0000f0]As New[/txt-color] ADODB.Connection
[txt-color=#0000f0]Public Sub[/txt-color] conectar_banco()
[txt-color=#0000f0]Dim [/txt-color]stringdeconexao [txt-color=#0000f0]As String[/txt-color]
stringdeconexao = [Ô]Data Source=c:Arquivos de programasMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQL;Initial Catalog=CHECKLIST;User Id=myUsername;Password=myPassword;[Ô]
conexao.Open stringdeconexao
[txt-color=#0000f0]End Sub[/txt-color]



Na propriedade DATASOURCE você informa o NOME DO SERVER ou IP (com a instância, caso o servidor possua).
Página 1 de 2 [16 registro(s)]
Tópico encerrado , respostas não são mais permitidas