-
Jul 15th, 2007, 09:41 AM
#1
Thread Starter
Hyperactive Member
[2005] Connection
im connecting 2 laptops through cross connection cord, im wondering what connection string i should be using to access the SQL database on one laptop from the other one, basically,, client -> server accessing. Thanks! im using VB 05 and MS SQL 05 Express tytyty
-
Jul 15th, 2007, 10:41 AM
#2
-
Jul 15th, 2007, 10:13 PM
#3
Thread Starter
Hyperactive Member
Re: [2005] Connection
can anyone brief me on what i should remember when using cross connection lan cable for connecting 2 laptops client -> server thanks
-
Jul 15th, 2007, 11:27 PM
#4
Re: [2005] Connection
It doesnt matter where in your network or workgroup your databas is, you still need proper access to its location and the proper connectionstring.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 16th, 2007, 12:12 AM
#5
Thread Starter
Hyperactive Member
Re: [2005] Connection
so if i want to connect to the other laptop's instance "Aerialz666\Thesis2" and the database name is "FinalDB" what connection string should i use? im not really sure tx
-
Jul 16th, 2007, 12:21 AM
#6
Re: [2005] Connection
You would include the server name (computer name) and database name, plus any logon credientials. If you click the link and go to connectionstrings.com you will find the cs you need.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 16th, 2007, 12:33 AM
#7
Thread Starter
Hyperactive Member
Re: [2005] Connection
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword; <-- this one is what i assume the right one, but i dont have my other laptop now so i cant try it, can this work?
Data Source = Aerialz666\Thesis2;Initial Catalog=FinalDB;User ID = xxxx;password=xxxx; <-- is this right? can it connect to the other computer and access the DB?
Last edited by RobDog888; Jul 16th, 2007 at 01:04 AM.
Reason: removed login credientials for safty.
-
Jul 16th, 2007, 01:03 AM
#8
Re: [2005] Connection
If you have given the logon account that is passed in the connectionstring permissions to connect to your sql db then the first one should be it.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 16th, 2007, 01:14 AM
#9
Addicted Member
Re: [2005] Connection
I think that should do it. Like Rob said, your username must have a permission to connect. Also, just remember that SQL Server 2005 Express disabled TCP/IP connection on default. You must enable it before.
-
Jul 16th, 2007, 01:17 AM
#10
Thread Starter
Hyperactive Member
Re: [2005] Connection
Use serverName\instanceName as Data Source to connect to a specific SQL Server instance.
Are you using SQL Server 2005 Express? Don't miss the server name syntax Servername\SQLEXPRESS where you substitute Servername with the name of the computer where the SQL Server 2005 Express installation resides.
since im using SQL Express 05, do i need to add a "\SQLEXPRESS" after my instance? assuming my instance name is Aerialz666\Thesis2 ? ..
making it Aerialz666\Thesis2\SQLEXPRESS ? trhanks
-
Jul 16th, 2007, 01:37 AM
#11
Thread Starter
Hyperactive Member
Re: [2005] Connection
btw, when i installed SQL express, it had a defaul user name of "sa" and then it allowed me to input my own password so is that the login account that has a persmission? thanks im not really good at this..
-
Jul 18th, 2007, 10:42 PM
#12
Addicted Member
Re: [2005] Connection
since im using SQL Express 05, do i need to add a "\SQLEXPRESS" after my instance? assuming my instance name is Aerialz666\Thesis2 ? ..
Yes. It should named "<your computername>\SQLEXPRESS".
btw, when i installed SQL express, it had a defaul user name of "sa" and then it allowed me to input my own password so is that the login account that has a persmission?
You can also create additional account. I don't suggest you to use "sa" account for acessing your server. To create another user, you should install SQL Server 2005 Management Express. It can be download for free in this site
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|