Results 1 to 5 of 5
  1. #1
    datadc is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2017
    Posts
    3

    Need Help to find SQL connections string

    Hi



    i am not an Access GURU i just took over a project,

    i am looking at the connection string and i see this code

    Public Function CurDb() As ADODB.Command


    If pCurDb Is Nothing Then
    'recordset, command and connection variables
    Dim Cnxn As ADODB.Connection
    Dim strCnxn As String

    ' Open connection
    Set Cnxn = New ADODB.Connection
    strCnxn = CurrentProject.AccessConnection
    Cnxn.Open strCnxn

    ' Open command object with one parameter
    Set pCurDb = New ADODB.Command
    Set pCurDb.ActiveConnection = Cnxn
    End If





    Set CurDb = pCurDb




    End Function

    i know that this code CurrentProject.AccessConnection is calling the connection

    my Questions is where is that configured ? where do i change it ?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Cross Posted at: https://access-programmers.co.uk/for...d.php?t=291521

    When you cross post, please tell readers you have done so and provide the associated link(s).

    Here is why!

  3. #3
    datadc is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2017
    Posts
    3
    Quote Originally Posted by RuralGuy View Post
    Cross Posted at: https://access-programmers.co.uk/for...d.php?t=291521

    When you cross post, please tell readers you have done so and provide the associated link(s).

    Here is why!
    i am really sorry about this,


    i figured one for the UK and one for the USA, but you are %100 right i apologist

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    That connects to the current database. To connect to something else, you'd set the string variable to the appropriate string. What are you trying to connect to?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    datadc is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2017
    Posts
    3
    i finally figured it out
    the guy used an access project file to configure the connections

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Find a record that contains a word in a string
    By knowshowrosegrows in forum Queries
    Replies: 2
    Last Post: 11-17-2015, 11:35 AM
  2. Function to find a number in string
    By LonghronJ in forum Modules
    Replies: 3
    Last Post: 09-28-2015, 02:15 PM
  3. find last object by spliting string
    By Mbakker71 in forum Access
    Replies: 2
    Last Post: 01-29-2014, 12:10 PM
  4. find all text string in Criteria at once
    By Jerseynjphillypa in forum Queries
    Replies: 3
    Last Post: 05-15-2012, 12:12 PM
  5. Find first Capital letter in string
    By Dutch1956 in forum Programming
    Replies: 5
    Last Post: 09-07-2011, 03:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums