Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 31st, 2004, 07:44 PM
Registered User
 
Join Date: Mar 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default access connection to msde & sqlserver

Hi all

I have an Access front end to an msde db on the pc, & wanting to access a sqlserver db on the network.

If I setup the connection to the msde db (File>Connection) then that is the currentproject.connection, & I can reference tables directly.

To get the sqlserver db I create an adodb.connection:
    Set mConn = New ADODB.Connection
    strConn = "Provider=Microsoft OLE DB Provider for Sql Server;" & _
      "Data Source=Epicor;Initial Catalog=TestRig;" & _
      "Persist Security Info=False; ;Integrated Security=SSPI;"
    mConn.Open strConn
 & that is fine.
Then I can create a recordset from that db:
    rst.Open strSql, mConn, adOpenStatic, adLockReadOnly

How can I INSERT INTO the sql server db ?

I see 3 possible options (none of which I've been able to get working):

1. Is there a syntax for prefixing the table name with server & database ?

2. Can I retain connection to the msde db & link to the sqlserver tables ? If so, can that be done in vba ?

3. My requirement is either to read from the msde db & write to the sqlserver db or vice versa.
Is it possible, in vba, to change the db that is the currentproject.connection ?






Similar Threads
Thread Thread Starter Forum Replies Last Post
VB 2005 SqlServer database connection chandra7 ADO.NET 0 December 1st, 2008 10:20 AM
connection to sqlserver through udl file qiux ADO.NET 1 May 21st, 2008 11:12 AM
Connection string for MSDE srkarthik_82 General .NET 1 January 25th, 2007 01:35 AM
using msde and sqlserver with access front-end catkins Pro VB 6 1 April 1st, 2004 04:00 AM
MSDE Connection not working Phil Williams MySQL 3 March 18th, 2004 04:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.