Need Connectionstrings to connect SQL Server using VB.Net in Windows Applications.(Not Web Application)

Asked By Janardhan Bonthu
17-Nov-08 07:53 AM
Earn up to 0 extra points for answering this tough question.
Need Connectionstrings to connect SQL Server using VB.Net in Windows Applications. (Not Web Application)

  SQL Server Connection strings

mv ark replied to Janardhan Bonthu
17-Nov-08 07:56 AM
Check these links:
http://connectionstrings.com/?carrier=sqlserver2005
http://connectionstrings.com/?carrier=sqlserver

  re

Web Star replied to Janardhan Bonthu
17-Nov-08 11:55 PM

use this

Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
 
and also u can get any connection string for different situation from here
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

  String

Anil pandey replied to Janardhan Bonthu
18-Nov-08 01:11 AM


hi,

U can refer the following Connection String

gstrConnstring = "Server= AP-185\\SQLEXPRESS;Database = Bulkmail;trusted_connection=true;";



Like this we can have the connection string the Windows application..


Regards
Anil Pandey
  Connection Strings
Sergio delos Santos Jr. replied to Janardhan Bonthu
17-Feb-09 02:05 AM

This is are the connection string that i have, just choose what you need.

Standard Security
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
 
 
Standard Security alternative syntax
This connection string produces the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents.
Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;
 
 
Trusted Connection
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
 
 
Trusted Connection alternative syntax
This connection string produce the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents.
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
Use serverName\instanceName as Data Source to use a specific SQL Server instance. Please note that the multiple SQL Server instances feature is available only from SQL Server version 2000 and not in any previous versions.
 
Connecting to an SQL Server instance
The syntax of specifying the server instance in the value of the server key is the same for all connection strings for SQL Server.
Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=True;
 
 
Trusted Connection from a CE device
Often a Windows CE device is not authenticated and logged in to a domain. To use SSPI or trusted connection / authentication from a CE device, use this connection string.
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;User ID=myDomain\myUsername;Password=myPassword;
Note that this will only work on a CE device.
 
Connect via an IP address
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
DBMSSOCN=TCP/IP. This is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server.
 
Specifying packet size
Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;Packet Size=4096;
Create New Account