|
-
Sep 19th, 2003, 10:34 AM
#1
Thread Starter
Registered User
[Resolved] Join SQL and Access table in VB query.
Hello all!
This should be simple but I can’t figure it out...
I have a table in SQL and a table in Access that I am trying to join. I have not found any way to do this so I creating two recordsets and manually searching through the records for a match and then created a 3rd record set with the appropriate records. This method does work, however it is VERY slow.
Does anyone know how to join an Access and an SQL table?
An alternative would be to link the SQL table in Access but the SQL table uses SQL authentication and therefore requires me to pass the login name and password. I would also rather not have to create an ODBC connection on every PC i install my software on. Thanks!
Last edited by Skeeve; Sep 22nd, 2003 at 10:26 AM.
-
Sep 19th, 2003, 11:06 AM
#2
You save the ODBC password in Access by checking the
checkbox "Save Password" when you create the linked tables.
Then create a File DSN and save it to the network you wont have
to set it up an ODBC on every computer.
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 
-
Sep 19th, 2003, 11:08 AM
#3
in the access database, link the sql server table (under file menu)
it will look just like an access table except it will have a little globe icon next to it (so that u know its linked) and you cant edit the structure of the table (you would need to do this in SQL Server itself)
now you can do your query off the access database and use both tables as if they are part of the same database...
there is no other way to do this.. (in ADO.NET you can however, connect to 2 different datasources in SQL statements.. pretty cool)
-
Sep 22nd, 2003, 10:27 AM
#4
Thread Starter
Registered User
Robodog,
Your suggestion worked perfectly! Thank you!
-
Sep 22nd, 2003, 10:42 AM
#5
Your welcome. Glad to hear you got it solved.
HTH.
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 
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
|