ODBC Connection Not Connecting

I am using the below code to 1) automatically connect to a Microsoft ODBC for 
Oracle connection called "FIN_CUR" and 2) run an query on a linked table in 
FIN_CUR

The issue i am having is that the ODBC connect part of the script appears to 
be working, but when it goes to try to run the query I still get the popup 
prompting for user name and password to make the connection to the ODBC.  I 
have verify that the user name and password are correct, but don't know what 
I am missing.

Here is my code

Public Sub OraConnect()
    Dim strErr As String
    On Error GoTo connError
    Set conn = New ADODB.Connection

    conn.ConnectionString = "Provider=MSDAORA.1; User 
ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"

    conn.Open
     
    Set cmd = New ADODB.Command
    Set cmd.ActiveConnection = conn

    DoCmd.OpenQuery "qappFIN_CUR_Truncate", , acReadOnly

    Exit Sub
'
' handle Oracle error
'
connError:
    strErr = "Error connecting to Oracle"
    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
    strErr = "Reports will NOT be created"
    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
    strErr = strErr & Err.Description
    MsgBox (strErr)

    Exit Sub
End Sub
0
Utf
12/14/2009 5:55:01 AM
access.modulesdaovba 1670 articles. 0 followers. Follow

13 Replies
1435 Views

Similar Articles

[PageSpeed] 30

Hi,
the problem - that DoCmd.OpenQuery has nothing to do with conn object. If 
you are talking about MDB file and qappFIN_CUR_Truncate is pass-through 
query - then you have to set connect property of the query:

currentdb.querydefs("qappFIN_CUR_Truncate ").Connect = "Provider=MSDAORA.1; 
User ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
DoCmd.OpenQuery "qappFIN_CUR_Truncate"

-- 
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com



"jutlaux" <jutlaux@discussions.microsoft.com> wrote in message 
news:CF2A2E7B-55ED-4713-9790-72F4A9512026@microsoft.com...
> I am using the below code to 1) automatically connect to a Microsoft ODBC 
> for
> Oracle connection called "FIN_CUR" and 2) run an query on a linked table 
> in
> FIN_CUR
>
> The issue i am having is that the ODBC connect part of the script appears 
> to
> be working, but when it goes to try to run the query I still get the popup
> prompting for user name and password to make the connection to the ODBC. 
> I
> have verify that the user name and password are correct, but don't know 
> what
> I am missing.
>
> Here is my code
>
> Public Sub OraConnect()
>    Dim strErr As String
>    On Error GoTo connError
>    Set conn = New ADODB.Connection
>
>    conn.ConnectionString = "Provider=MSDAORA.1; User
> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>
>    conn.Open
>
>    Set cmd = New ADODB.Command
>    Set cmd.ActiveConnection = conn
>
>    DoCmd.OpenQuery "qappFIN_CUR_Truncate", , acReadOnly
>
>    Exit Sub
> '
> ' handle Oracle error
> '
> connError:
>    strErr = "Error connecting to Oracle"
>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>    strErr = "Reports will NOT be created"
>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>    strErr = strErr & Err.Description
>    MsgBox (strErr)
>
>    Exit Sub
> End Sub 

0
Alex
12/14/2009 9:32:42 AM
Don't you need to specify ODBC in that Connect string, Alex:

  currentdb.querydefs("qappFIN_CUR_Truncate ").Connect = 
"ODBC;Provider=MSDAORA.1;
User ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
  DoCmd.OpenQuery "qappFIN_CUR_Truncate"


-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Alex Dybenko" <alexdyb@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message 
news:eInW5JKfKHA.6096@TK2MSFTNGP02.phx.gbl...
> Hi,
> the problem - that DoCmd.OpenQuery has nothing to do with conn object. If 
> you are talking about MDB file and qappFIN_CUR_Truncate is pass-through 
> query - then you have to set connect property of the query:
>
> currentdb.querydefs("qappFIN_CUR_Truncate ").Connect = 
> "Provider=MSDAORA.1; User ID=GENERIC;Password=GENERIC; Data 
> Source=FIN_CUR;"
> DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>
> -- 
> Best regards,
> ___________
> Alex Dybenko (MVP)
> http://accessblog.net
> http://www.PointLtd.com
>
>
>
> "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message 
> news:CF2A2E7B-55ED-4713-9790-72F4A9512026@microsoft.com...
>> I am using the below code to 1) automatically connect to a Microsoft ODBC 
>> for
>> Oracle connection called "FIN_CUR" and 2) run an query on a linked table 
>> in
>> FIN_CUR
>>
>> The issue i am having is that the ODBC connect part of the script appears 
>> to
>> be working, but when it goes to try to run the query I still get the 
>> popup
>> prompting for user name and password to make the connection to the ODBC. 
>> I
>> have verify that the user name and password are correct, but don't know 
>> what
>> I am missing.
>>
>> Here is my code
>>
>> Public Sub OraConnect()
>>    Dim strErr As String
>>    On Error GoTo connError
>>    Set conn = New ADODB.Connection
>>
>>    conn.ConnectionString = "Provider=MSDAORA.1; User
>> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>>
>>    conn.Open
>>
>>    Set cmd = New ADODB.Command
>>    Set cmd.ActiveConnection = conn
>>
>>    DoCmd.OpenQuery "qappFIN_CUR_Truncate", , acReadOnly
>>
>>    Exit Sub
>> '
>> ' handle Oracle error
>> '
>> connError:
>>    strErr = "Error connecting to Oracle"
>>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>>    strErr = "Reports will NOT be created"
>>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>>    strErr = strErr & Err.Description
>>    MsgBox (strErr)
>>
>>    Exit Sub
>> End Sub
> 

0
Douglas
12/14/2009 12:56:19 PM
 I have modified my code to reflect your responses.  Now when it gets to the 
Docmd.Open query I get a pop up to select data source instead of it running 
the query.

Public Sub OraConnect()
    Dim strErr As String
    On Error GoTo connError
    Set conn = New ADODB.Connection
    
    conn.ConnectionString = "Provider=MSDAORA.1; User 
ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
    
    conn.Open
    
    Set cmd = New ADODB.Command
    Set cmd.ActiveConnection = conn
    
    CurrentDb.QueryDefs("qappFIN_CUR_Truncate").Connect = 
"ODBC;Provider=MSDAORA.1;User ID=GENERIC;Password=GENERIC; Data 
Source=FIN_CUR;"

    DoCmd.OpenQuery "qappFIN_CUR_Truncate"
    
    Exit Sub
'
' handle Oracle error
'
connError:
    strErr = "Error connecting to Oracle"
    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
    strErr = "Data Will Not Be Updated"
    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
    strErr = strErr & Err.Number & " " & Err.Description
    MsgBox (strErr)

    Exit Sub
End Sub

"Douglas J. Steele" wrote:

> Don't you need to specify ODBC in that Connect string, Alex:
> 
>   currentdb.querydefs("qappFIN_CUR_Truncate ").Connect = 
> "ODBC;Provider=MSDAORA.1;
> User ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>   DoCmd.OpenQuery "qappFIN_CUR_Truncate"
> 
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
> 
> 
> 
> "Alex Dybenko" <alexdyb@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message 
> news:eInW5JKfKHA.6096@TK2MSFTNGP02.phx.gbl...
> > Hi,
> > the problem - that DoCmd.OpenQuery has nothing to do with conn object. If 
> > you are talking about MDB file and qappFIN_CUR_Truncate is pass-through 
> > query - then you have to set connect property of the query:
> >
> > currentdb.querydefs("qappFIN_CUR_Truncate ").Connect = 
> > "Provider=MSDAORA.1; User ID=GENERIC;Password=GENERIC; Data 
> > Source=FIN_CUR;"
> > DoCmd.OpenQuery "qappFIN_CUR_Truncate"
> >
> > -- 
> > Best regards,
> > ___________
> > Alex Dybenko (MVP)
> > http://accessblog.net
> > http://www.PointLtd.com
> >
> >
> >
> > "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message 
> > news:CF2A2E7B-55ED-4713-9790-72F4A9512026@microsoft.com...
> >> I am using the below code to 1) automatically connect to a Microsoft ODBC 
> >> for
> >> Oracle connection called "FIN_CUR" and 2) run an query on a linked table 
> >> in
> >> FIN_CUR
> >>
> >> The issue i am having is that the ODBC connect part of the script appears 
> >> to
> >> be working, but when it goes to try to run the query I still get the 
> >> popup
> >> prompting for user name and password to make the connection to the ODBC. 
> >> I
> >> have verify that the user name and password are correct, but don't know 
> >> what
> >> I am missing.
> >>
> >> Here is my code
> >>
> >> Public Sub OraConnect()
> >>    Dim strErr As String
> >>    On Error GoTo connError
> >>    Set conn = New ADODB.Connection
> >>
> >>    conn.ConnectionString = "Provider=MSDAORA.1; User
> >> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
> >>
> >>    conn.Open
> >>
> >>    Set cmd = New ADODB.Command
> >>    Set cmd.ActiveConnection = conn
> >>
> >>    DoCmd.OpenQuery "qappFIN_CUR_Truncate", , acReadOnly
> >>
> >>    Exit Sub
> >> '
> >> ' handle Oracle error
> >> '
> >> connError:
> >>    strErr = "Error connecting to Oracle"
> >>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
> >>    strErr = "Reports will NOT be created"
> >>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
> >>    strErr = strErr & Err.Description
> >>    MsgBox (strErr)
> >>
> >>    Exit Sub
> >> End Sub
> > 
> 
> .
> 
0
Utf
12/14/2009 7:13:01 PM
First of all, you don't need the code

    Set conn = New ADODB.Connection

    conn.ConnectionString = "Provider=MSDAORA.1; User 
ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"

    conn.Open

    Set cmd = New ADODB.Command
    Set cmd.ActiveConnection = conn

It's doing absolutely nothing!

Does the data source FIN_CUR exist?

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"jutlaux" <jutlaux@discussions.microsoft.com> wrote in message 
news:B218383D-4AEC-4B90-A015-BE2D7D90162D@microsoft.com...
>
> I have modified my code to reflect your responses.  Now when it gets to 
> the
> Docmd.Open query I get a pop up to select data source instead of it 
> running
> the query.
>
> Public Sub OraConnect()
>    Dim strErr As String
>    On Error GoTo connError
>    Set conn = New ADODB.Connection
>
>    conn.ConnectionString = "Provider=MSDAORA.1; User
> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>
>    conn.Open
>
>    Set cmd = New ADODB.Command
>    Set cmd.ActiveConnection = conn
>
>    CurrentDb.QueryDefs("qappFIN_CUR_Truncate").Connect =
> "ODBC;Provider=MSDAORA.1;User ID=GENERIC;Password=GENERIC; Data
> Source=FIN_CUR;"
>
>    DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>
>    Exit Sub
> '
> ' handle Oracle error
> '
> connError:
>    strErr = "Error connecting to Oracle"
>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>    strErr = "Data Will Not Be Updated"
>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>    strErr = strErr & Err.Number & " " & Err.Description
>    MsgBox (strErr)
>
>    Exit Sub
> End Sub
>
> "Douglas J. Steele" wrote:
>
>> Don't you need to specify ODBC in that Connect string, Alex:
>>
>>   currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
>> "ODBC;Provider=MSDAORA.1;
>> User ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>>   DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>>
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>>
>> "Alex Dybenko" <alexdyb@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message
>> news:eInW5JKfKHA.6096@TK2MSFTNGP02.phx.gbl...
>> > Hi,
>> > the problem - that DoCmd.OpenQuery has nothing to do with conn object. 
>> > If
>> > you are talking about MDB file and qappFIN_CUR_Truncate is pass-through
>> > query - then you have to set connect property of the query:
>> >
>> > currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
>> > "Provider=MSDAORA.1; User ID=GENERIC;Password=GENERIC; Data
>> > Source=FIN_CUR;"
>> > DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>> >
>> > -- 
>> > Best regards,
>> > ___________
>> > Alex Dybenko (MVP)
>> > http://accessblog.net
>> > http://www.PointLtd.com
>> >
>> >
>> >
>> > "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message
>> > news:CF2A2E7B-55ED-4713-9790-72F4A9512026@microsoft.com...
>> >> I am using the below code to 1) automatically connect to a Microsoft 
>> >> ODBC
>> >> for
>> >> Oracle connection called "FIN_CUR" and 2) run an query on a linked 
>> >> table
>> >> in
>> >> FIN_CUR
>> >>
>> >> The issue i am having is that the ODBC connect part of the script 
>> >> appears
>> >> to
>> >> be working, but when it goes to try to run the query I still get the
>> >> popup
>> >> prompting for user name and password to make the connection to the 
>> >> ODBC.
>> >> I
>> >> have verify that the user name and password are correct, but don't 
>> >> know
>> >> what
>> >> I am missing.
>> >>
>> >> Here is my code
>> >>
>> >> Public Sub OraConnect()
>> >>    Dim strErr As String
>> >>    On Error GoTo connError
>> >>    Set conn = New ADODB.Connection
>> >>
>> >>    conn.ConnectionString = "Provider=MSDAORA.1; User
>> >> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>> >>
>> >>    conn.Open
>> >>
>> >>    Set cmd = New ADODB.Command
>> >>    Set cmd.ActiveConnection = conn
>> >>
>> >>    DoCmd.OpenQuery "qappFIN_CUR_Truncate", , acReadOnly
>> >>
>> >>    Exit Sub
>> >> '
>> >> ' handle Oracle error
>> >> '
>> >> connError:
>> >>    strErr = "Error connecting to Oracle"
>> >>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>> >>    strErr = "Reports will NOT be created"
>> >>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>> >>    strErr = strErr & Err.Description
>> >>    MsgBox (strErr)
>> >>
>> >>    Exit Sub
>> >> End Sub
>> >
>>
>> .
>> 


0
Douglas
12/14/2009 9:09:26 PM
Don't you need to specify the fully qualified database name, including the
path? I'm not sure what FIN_CUR is, but it seems that more than that is
needed. Does the code need a DSN value rather than Data Source? Sorry if I'm
off base, I don't use ODBC, but I looked at some examples and they semed to
use 'DSN=someDatabaseName'.

Douglas J. Steele wrote:
>First of all, you don't need the code
>
>    Set conn = New ADODB.Connection
>
>    conn.ConnectionString = "Provider=MSDAORA.1; User 
>ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>
>    conn.Open
>
>    Set cmd = New ADODB.Command
>    Set cmd.ActiveConnection = conn
>
>It's doing absolutely nothing!
>
>Does the data source FIN_CUR exist?
>
>> I have modified my code to reflect your responses.  Now when it gets to 
>> the
>[quoted text clipped - 108 lines]
>>>
>>> .

-- 
Jim Burke

Message posted via http://www.accessmonster.com

0
JimBurke
12/14/2009 10:49:31 PM
Data Source should be the Path to the Access backend like "C:\MyFolder\
MyDatabase.mdb" or the Path to the SQL Server like "\\ServerName\
SQLServerName" or sometimes an IP address.

Is seems that the OP is not using the corrrect Provider "MSDAORA". I'm not
certian this will work with ADO as it is using DAO.

The OP never said any about the connection. Connect to What? A Access file or
SQL Server?

Here's a connection to Access File. It's only one sample, there are more.
Standard security
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;User
Id=admin;Password=;

If OP using 2007.
Standard security
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.
accdb;Persist Security Info=False;

Here's the sample for if SQL Server (2005)
Trusted Connection
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated
Security=SSPI;  Trusted Connection 

alternative syntax
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;  

Connecting to an SQL Server instance 
Server=myServerName\
theInstanceName;Database=myDataBase;Trusted_Connection=True;

And where is "Conn" and "cmd" declared?

And if OP is using ODBC.

Standard security
Driver={SQL Server Native Client 10.0}
;Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Trusted Connection

Driver={SQL Server Native Client 10.0}
;Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;Equivalent
key-value pair: "Integrated Security=SSPI" equals "Trusted_Connection=yes" 

Connecting to an SQL Server instance 
Driver={SQL Server Native Client 10.0};Server=myServerName\theInstanceName;
Database=myDataBase;Trusted_Connection=yes;

If not using Trusted Connection, set it to "No".

JimBurke wrote:
>Don't you need to specify the fully qualified database name, including the
>path? I'm not sure what FIN_CUR is, but it seems that more than that is
>needed. Does the code need a DSN value rather than Data Source? Sorry if I'm

No, DSN refers to the source of the DSN connection where you have create the
DSN in your PC control Panel - Administrative Tools - Data Source. It is the
NAME of that source.

>off base, I don't use ODBC, but I looked at some examples and they semed to
>use 'DSN=someDatabaseName'.

-- 
Please Rate the posting if helps you.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/200912/1

0
AccessVandal
12/15/2009 1:11:44 AM
Deleted all code as you suggested.  The data source does exist and was setup 
under the System DSN and I have verified that supplied user name and password 
are valid and work.

"Douglas J. Steele" wrote:

> First of all, you don't need the code
> 
>     Set conn = New ADODB.Connection
> 
>     conn.ConnectionString = "Provider=MSDAORA.1; User 
> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
> 
>     conn.Open
> 
>     Set cmd = New ADODB.Command
>     Set cmd.ActiveConnection = conn
> 
> It's doing absolutely nothing!
> 
> Does the data source FIN_CUR exist?
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
> 
> 
> "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message 
> news:B218383D-4AEC-4B90-A015-BE2D7D90162D@microsoft.com...
> >
> > I have modified my code to reflect your responses.  Now when it gets to 
> > the
> > Docmd.Open query I get a pop up to select data source instead of it 
> > running
> > the query.
> >
> > Public Sub OraConnect()
> >    Dim strErr As String
> >    On Error GoTo connError
> >    Set conn = New ADODB.Connection
> >
> >    conn.ConnectionString = "Provider=MSDAORA.1; User
> > ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
> >
> >    conn.Open
> >
> >    Set cmd = New ADODB.Command
> >    Set cmd.ActiveConnection = conn
> >
> >    CurrentDb.QueryDefs("qappFIN_CUR_Truncate").Connect =
> > "ODBC;Provider=MSDAORA.1;User ID=GENERIC;Password=GENERIC; Data
> > Source=FIN_CUR;"
> >
> >    DoCmd.OpenQuery "qappFIN_CUR_Truncate"
> >
> >    Exit Sub
> > '
> > ' handle Oracle error
> > '
> > connError:
> >    strErr = "Error connecting to Oracle"
> >    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
> >    strErr = "Data Will Not Be Updated"
> >    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
> >    strErr = strErr & Err.Number & " " & Err.Description
> >    MsgBox (strErr)
> >
> >    Exit Sub
> > End Sub
> >
> > "Douglas J. Steele" wrote:
> >
> >> Don't you need to specify ODBC in that Connect string, Alex:
> >>
> >>   currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
> >> "ODBC;Provider=MSDAORA.1;
> >> User ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
> >>   DoCmd.OpenQuery "qappFIN_CUR_Truncate"
> >>
> >>
> >> -- 
> >> Doug Steele, Microsoft Access MVP
> >> http://I.Am/DougSteele
> >> (no e-mails, please!)
> >>
> >>
> >>
> >> "Alex Dybenko" <alexdyb@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message
> >> news:eInW5JKfKHA.6096@TK2MSFTNGP02.phx.gbl...
> >> > Hi,
> >> > the problem - that DoCmd.OpenQuery has nothing to do with conn object. 
> >> > If
> >> > you are talking about MDB file and qappFIN_CUR_Truncate is pass-through
> >> > query - then you have to set connect property of the query:
> >> >
> >> > currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
> >> > "Provider=MSDAORA.1; User ID=GENERIC;Password=GENERIC; Data
> >> > Source=FIN_CUR;"
> >> > DoCmd.OpenQuery "qappFIN_CUR_Truncate"
> >> >
> >> > -- 
> >> > Best regards,
> >> > ___________
> >> > Alex Dybenko (MVP)
> >> > http://accessblog.net
> >> > http://www.PointLtd.com
> >> >
> >> >
> >> >
> >> > "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message
> >> > news:CF2A2E7B-55ED-4713-9790-72F4A9512026@microsoft.com...
> >> >> I am using the below code to 1) automatically connect to a Microsoft 
> >> >> ODBC
> >> >> for
> >> >> Oracle connection called "FIN_CUR" and 2) run an query on a linked 
> >> >> table
> >> >> in
> >> >> FIN_CUR
> >> >>
> >> >> The issue i am having is that the ODBC connect part of the script 
> >> >> appears
> >> >> to
> >> >> be working, but when it goes to try to run the query I still get the
> >> >> popup
> >> >> prompting for user name and password to make the connection to the 
> >> >> ODBC.
> >> >> I
> >> >> have verify that the user name and password are correct, but don't 
> >> >> know
> >> >> what
> >> >> I am missing.
> >> >>
> >> >> Here is my code
> >> >>
> >> >> Public Sub OraConnect()
> >> >>    Dim strErr As String
> >> >>    On Error GoTo connError
> >> >>    Set conn = New ADODB.Connection
> >> >>
> >> >>    conn.ConnectionString = "Provider=MSDAORA.1; User
> >> >> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
> >> >>
> >> >>    conn.Open
> >> >>
> >> >>    Set cmd = New ADODB.Command
> >> >>    Set cmd.ActiveConnection = conn
> >> >>
> >> >>    DoCmd.OpenQuery "qappFIN_CUR_Truncate", , acReadOnly
> >> >>
> >> >>    Exit Sub
> >> >> '
> >> >> ' handle Oracle error
> >> >> '
> >> >> connError:
> >> >>    strErr = "Error connecting to Oracle"
> >> >>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
> >> >>    strErr = "Reports will NOT be created"
> >> >>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
> >> >>    strErr = strErr & Err.Description
> >> >>    MsgBox (strErr)
> >> >>
> >> >>    Exit Sub
> >> >> End Sub
> >> >
> >>
> >> .
> >> 
> 
> 
> .
> 
0
Utf
12/15/2009 1:36:01 AM
Did you put in the ODBC at the beginning, as I suggested?

  currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
"ODBC;Provider=MSDAORA.1;User ID=GENERIC;Password=GENERIC; Data 
Source=FIN_CUR;"
  DoCmd.OpenQuery "qappFIN_CUR_Truncate"


-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"jutlaux" <jutlaux@discussions.microsoft.com> wrote in message 
news:1A4D04FA-D499-4ECE-8816-4EB34A79E823@microsoft.com...
> Deleted all code as you suggested.  The data source does exist and was 
> setup
> under the System DSN and I have verified that supplied user name and 
> password
> are valid and work.
>
> "Douglas J. Steele" wrote:
>
>> First of all, you don't need the code
>>
>>     Set conn = New ADODB.Connection
>>
>>     conn.ConnectionString = "Provider=MSDAORA.1; User
>> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>>
>>     conn.Open
>>
>>     Set cmd = New ADODB.Command
>>     Set cmd.ActiveConnection = conn
>>
>> It's doing absolutely nothing!
>>
>> Does the data source FIN_CUR exist?
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no private e-mails, please)
>>
>>
>> "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message
>> news:B218383D-4AEC-4B90-A015-BE2D7D90162D@microsoft.com...
>> >
>> > I have modified my code to reflect your responses.  Now when it gets to
>> > the
>> > Docmd.Open query I get a pop up to select data source instead of it
>> > running
>> > the query.
>> >
>> > Public Sub OraConnect()
>> >    Dim strErr As String
>> >    On Error GoTo connError
>> >    Set conn = New ADODB.Connection
>> >
>> >    conn.ConnectionString = "Provider=MSDAORA.1; User
>> > ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>> >
>> >    conn.Open
>> >
>> >    Set cmd = New ADODB.Command
>> >    Set cmd.ActiveConnection = conn
>> >
>> >    CurrentDb.QueryDefs("qappFIN_CUR_Truncate").Connect =
>> > "ODBC;Provider=MSDAORA.1;User ID=GENERIC;Password=GENERIC; Data
>> > Source=FIN_CUR;"
>> >
>> >    DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>> >
>> >    Exit Sub
>> > '
>> > ' handle Oracle error
>> > '
>> > connError:
>> >    strErr = "Error connecting to Oracle"
>> >    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>> >    strErr = "Data Will Not Be Updated"
>> >    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>> >    strErr = strErr & Err.Number & " " & Err.Description
>> >    MsgBox (strErr)
>> >
>> >    Exit Sub
>> > End Sub
>> >
>> > "Douglas J. Steele" wrote:
>> >
>> >> Don't you need to specify ODBC in that Connect string, Alex:
>> >>
>> >>   currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
>> >> "ODBC;Provider=MSDAORA.1;
>> >> User ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>> >>   DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>> >>
>> >>
>> >> -- 
>> >> Doug Steele, Microsoft Access MVP
>> >> http://I.Am/DougSteele
>> >> (no e-mails, please!)
>> >>
>> >>
>> >>
>> >> "Alex Dybenko" <alexdyb@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message
>> >> news:eInW5JKfKHA.6096@TK2MSFTNGP02.phx.gbl...
>> >> > Hi,
>> >> > the problem - that DoCmd.OpenQuery has nothing to do with conn 
>> >> > object.
>> >> > If
>> >> > you are talking about MDB file and qappFIN_CUR_Truncate is 
>> >> > pass-through
>> >> > query - then you have to set connect property of the query:
>> >> >
>> >> > currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
>> >> > "Provider=MSDAORA.1; User ID=GENERIC;Password=GENERIC; Data
>> >> > Source=FIN_CUR;"
>> >> > DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>> >> >
>> >> > -- 
>> >> > Best regards,
>> >> > ___________
>> >> > Alex Dybenko (MVP)
>> >> > http://accessblog.net
>> >> > http://www.PointLtd.com
>> >> >
>> >> >
>> >> >
>> >> > "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message
>> >> > news:CF2A2E7B-55ED-4713-9790-72F4A9512026@microsoft.com...
>> >> >> I am using the below code to 1) automatically connect to a 
>> >> >> Microsoft
>> >> >> ODBC
>> >> >> for
>> >> >> Oracle connection called "FIN_CUR" and 2) run an query on a linked
>> >> >> table
>> >> >> in
>> >> >> FIN_CUR
>> >> >>
>> >> >> The issue i am having is that the ODBC connect part of the script
>> >> >> appears
>> >> >> to
>> >> >> be working, but when it goes to try to run the query I still get 
>> >> >> the
>> >> >> popup
>> >> >> prompting for user name and password to make the connection to the
>> >> >> ODBC.
>> >> >> I
>> >> >> have verify that the user name and password are correct, but don't
>> >> >> know
>> >> >> what
>> >> >> I am missing.
>> >> >>
>> >> >> Here is my code
>> >> >>
>> >> >> Public Sub OraConnect()
>> >> >>    Dim strErr As String
>> >> >>    On Error GoTo connError
>> >> >>    Set conn = New ADODB.Connection
>> >> >>
>> >> >>    conn.ConnectionString = "Provider=MSDAORA.1; User
>> >> >> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>> >> >>
>> >> >>    conn.Open
>> >> >>
>> >> >>    Set cmd = New ADODB.Command
>> >> >>    Set cmd.ActiveConnection = conn
>> >> >>
>> >> >>    DoCmd.OpenQuery "qappFIN_CUR_Truncate", , acReadOnly
>> >> >>
>> >> >>    Exit Sub
>> >> >> '
>> >> >> ' handle Oracle error
>> >> >> '
>> >> >> connError:
>> >> >>    strErr = "Error connecting to Oracle"
>> >> >>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>> >> >>    strErr = "Reports will NOT be created"
>> >> >>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>> >> >>    strErr = strErr & Err.Description
>> >> >>    MsgBox (strErr)
>> >> >>
>> >> >>    Exit Sub
>> >> >> End Sub
>> >> >
>> >>
>> >> .
>> >>
>>
>>
>> .
>> 

0
Douglas
12/15/2009 2:08:45 AM
I did.  Here is the script as it stands right now.

Public Sub OraConnect2()
    Dim strErr As String
    On Error GoTo connError

    CurrentDb.QueryDefs("qappFIN_CUR_Truncate").Connect = "ODBC;Data 
Source=FIN_CUR;User ID=GENERIC;Password=GENERIC"
    
    DoCmd.OpenQuery "qappFIN_CUR_Truncate" ', , acReadOnly
    
    Exit Sub
'
' handle Oracle error
'
connError:
    strErr = "Error connecting to Oracle"
    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
    strErr = "Data Will Not Be Updated"
    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
    strErr = strErr & Err.Number & " " & Err.Description
    MsgBox (strErr)

    Exit Sub
End Sub

"Douglas J. Steele" wrote:

> Did you put in the ODBC at the beginning, as I suggested?
> 
>   currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
> "ODBC;Provider=MSDAORA.1;User ID=GENERIC;Password=GENERIC; Data 
> Source=FIN_CUR;"
>   DoCmd.OpenQuery "qappFIN_CUR_Truncate"
> 
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
> 
> 
> 
> "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message 
> news:1A4D04FA-D499-4ECE-8816-4EB34A79E823@microsoft.com...
> > Deleted all code as you suggested.  The data source does exist and was 
> > setup
> > under the System DSN and I have verified that supplied user name and 
> > password
> > are valid and work.
> >
> > "Douglas J. Steele" wrote:
> >
> >> First of all, you don't need the code
> >>
> >>     Set conn = New ADODB.Connection
> >>
> >>     conn.ConnectionString = "Provider=MSDAORA.1; User
> >> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
> >>
> >>     conn.Open
> >>
> >>     Set cmd = New ADODB.Command
> >>     Set cmd.ActiveConnection = conn
> >>
> >> It's doing absolutely nothing!
> >>
> >> Does the data source FIN_CUR exist?
> >>
> >> -- 
> >> Doug Steele, Microsoft Access MVP
> >> http://I.Am/DougSteele
> >> (no private e-mails, please)
> >>
> >>
> >> "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message
> >> news:B218383D-4AEC-4B90-A015-BE2D7D90162D@microsoft.com...
> >> >
> >> > I have modified my code to reflect your responses.  Now when it gets to
> >> > the
> >> > Docmd.Open query I get a pop up to select data source instead of it
> >> > running
> >> > the query.
> >> >
> >> > Public Sub OraConnect()
> >> >    Dim strErr As String
> >> >    On Error GoTo connError
> >> >    Set conn = New ADODB.Connection
> >> >
> >> >    conn.ConnectionString = "Provider=MSDAORA.1; User
> >> > ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
> >> >
> >> >    conn.Open
> >> >
> >> >    Set cmd = New ADODB.Command
> >> >    Set cmd.ActiveConnection = conn
> >> >
> >> >    CurrentDb.QueryDefs("qappFIN_CUR_Truncate").Connect =
> >> > "ODBC;Provider=MSDAORA.1;User ID=GENERIC;Password=GENERIC; Data
> >> > Source=FIN_CUR;"
> >> >
> >> >    DoCmd.OpenQuery "qappFIN_CUR_Truncate"
> >> >
> >> >    Exit Sub
> >> > '
> >> > ' handle Oracle error
> >> > '
> >> > connError:
> >> >    strErr = "Error connecting to Oracle"
> >> >    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
> >> >    strErr = "Data Will Not Be Updated"
> >> >    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
> >> >    strErr = strErr & Err.Number & " " & Err.Description
> >> >    MsgBox (strErr)
> >> >
> >> >    Exit Sub
> >> > End Sub
> >> >
> >> > "Douglas J. Steele" wrote:
> >> >
> >> >> Don't you need to specify ODBC in that Connect string, Alex:
> >> >>
> >> >>   currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
> >> >> "ODBC;Provider=MSDAORA.1;
> >> >> User ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
> >> >>   DoCmd.OpenQuery "qappFIN_CUR_Truncate"
> >> >>
> >> >>
> >> >> -- 
> >> >> Doug Steele, Microsoft Access MVP
> >> >> http://I.Am/DougSteele
> >> >> (no e-mails, please!)
> >> >>
> >> >>
> >> >>
> >> >> "Alex Dybenko" <alexdyb@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message
> >> >> news:eInW5JKfKHA.6096@TK2MSFTNGP02.phx.gbl...
> >> >> > Hi,
> >> >> > the problem - that DoCmd.OpenQuery has nothing to do with conn 
> >> >> > object.
> >> >> > If
> >> >> > you are talking about MDB file and qappFIN_CUR_Truncate is 
> >> >> > pass-through
> >> >> > query - then you have to set connect property of the query:
> >> >> >
> >> >> > currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
> >> >> > "Provider=MSDAORA.1; User ID=GENERIC;Password=GENERIC; Data
> >> >> > Source=FIN_CUR;"
> >> >> > DoCmd.OpenQuery "qappFIN_CUR_Truncate"
> >> >> >
> >> >> > -- 
> >> >> > Best regards,
> >> >> > ___________
> >> >> > Alex Dybenko (MVP)
> >> >> > http://accessblog.net
> >> >> > http://www.PointLtd.com
> >> >> >
> >> >> >
> >> >> >
> >> >> > "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message
> >> >> > news:CF2A2E7B-55ED-4713-9790-72F4A9512026@microsoft.com...
> >> >> >> I am using the below code to 1) automatically connect to a 
> >> >> >> Microsoft
> >> >> >> ODBC
> >> >> >> for
> >> >> >> Oracle connection called "FIN_CUR" and 2) run an query on a linked
> >> >> >> table
> >> >> >> in
> >> >> >> FIN_CUR
> >> >> >>
> >> >> >> The issue i am having is that the ODBC connect part of the script
> >> >> >> appears
> >> >> >> to
> >> >> >> be working, but when it goes to try to run the query I still get 
> >> >> >> the
> >> >> >> popup
> >> >> >> prompting for user name and password to make the connection to the
> >> >> >> ODBC.
> >> >> >> I
> >> >> >> have verify that the user name and password are correct, but don't
> >> >> >> know
> >> >> >> what
> >> >> >> I am missing.
> >> >> >>
> >> >> >> Here is my code
> >> >> >>
> >> >> >> Public Sub OraConnect()
> >> >> >>    Dim strErr As String
> >> >> >>    On Error GoTo connError
> >> >> >>    Set conn = New ADODB.Connection
> >> >> >>
> >> >> >>    conn.ConnectionString = "Provider=MSDAORA.1; User
> >> >> >> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
> >> >> >>
> >> >> >>    conn.Open
> >> >> >>
> >> >> >>    Set cmd = New ADODB.Command
> >> >> >>    Set cmd.ActiveConnection = conn
> >> >> >>
> >> >> >>    DoCmd.OpenQuery "qappFIN_CUR_Truncate", , acReadOnly
> >> >> >>
> >> >> >>    Exit Sub
> >> >> >> '
> >> >> >> ' handle Oracle error
> >> >> >> '
> >> >> >> connError:
> >> >> >>    strErr = "Error connecting to Oracle"
> >> >> >>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
> >> >> >>    strErr = "Reports will NOT be created"
> >> >> >>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
> >> >> >>    strErr = strErr & Err.Description
> >> >> >>    MsgBox (strErr)
> >> >> >>
> >> >> >>    Exit Sub
> >> >> >> End Sub
> >> >> >
> >> >>
> >> >> .
> >> >>
> >>
> >>
> >> .
> >> 
> 
> .
> 
0
Utf
12/15/2009 3:41:02 AM
Hmm. Not sure, but try

Public Sub OraConnect2()
Dim qdfPT As QueryDef
Dim strErr As String
    On Error GoTo connError

    Set qdfPT = CurrentDb.QueryDefs("qappFIN_CUR_Truncate")
    qdfPT.Connect = "ODBC;Data Source=FIN_CUR;User 
ID=GENERIC;Password=GENERIC"
    qdfPT.Close
    Set qdfPT = Nothing

    DoCmd.OpenQuery "qappFIN_CUR_Truncate" ', , acReadOnly

    Exit Sub
'
' handle Oracle error
'
connError:
    strErr = "Error connecting to Oracle"
    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
    strErr = "Data Will Not Be Updated"
    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
    strErr = strErr & Err.Number & " " & Err.Description
    MsgBox (strErr)

    Exit Sub
End Sub

On the other hand, you're probably better off using the Execute method, 
rather than OpenQuery.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"jutlaux" <jutlaux@discussions.microsoft.com> wrote in message 
news:C7B3E0F1-C873-4BDF-9C97-983021B391CA@microsoft.com...
>I did.  Here is the script as it stands right now.
>
> Public Sub OraConnect2()
>    Dim strErr As String
>    On Error GoTo connError
>
>    CurrentDb.QueryDefs("qappFIN_CUR_Truncate").Connect = "ODBC;Data
> Source=FIN_CUR;User ID=GENERIC;Password=GENERIC"
>
>    DoCmd.OpenQuery "qappFIN_CUR_Truncate" ', , acReadOnly
>
>    Exit Sub
> '
> ' handle Oracle error
> '
> connError:
>    strErr = "Error connecting to Oracle"
>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>    strErr = "Data Will Not Be Updated"
>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>    strErr = strErr & Err.Number & " " & Err.Description
>    MsgBox (strErr)
>
>    Exit Sub
> End Sub
>
> "Douglas J. Steele" wrote:
>
>> Did you put in the ODBC at the beginning, as I suggested?
>>
>>   currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
>> "ODBC;Provider=MSDAORA.1;User ID=GENERIC;Password=GENERIC; Data
>> Source=FIN_CUR;"
>>   DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>>
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>>
>> "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message
>> news:1A4D04FA-D499-4ECE-8816-4EB34A79E823@microsoft.com...
>> > Deleted all code as you suggested.  The data source does exist and was
>> > setup
>> > under the System DSN and I have verified that supplied user name and
>> > password
>> > are valid and work.
>> >
>> > "Douglas J. Steele" wrote:
>> >
>> >> First of all, you don't need the code
>> >>
>> >>     Set conn = New ADODB.Connection
>> >>
>> >>     conn.ConnectionString = "Provider=MSDAORA.1; User
>> >> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>> >>
>> >>     conn.Open
>> >>
>> >>     Set cmd = New ADODB.Command
>> >>     Set cmd.ActiveConnection = conn
>> >>
>> >> It's doing absolutely nothing!
>> >>
>> >> Does the data source FIN_CUR exist?
>> >>
>> >> -- 
>> >> Doug Steele, Microsoft Access MVP
>> >> http://I.Am/DougSteele
>> >> (no private e-mails, please)
>> >>
>> >>
>> >> "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message
>> >> news:B218383D-4AEC-4B90-A015-BE2D7D90162D@microsoft.com...
>> >> >
>> >> > I have modified my code to reflect your responses.  Now when it gets 
>> >> > to
>> >> > the
>> >> > Docmd.Open query I get a pop up to select data source instead of it
>> >> > running
>> >> > the query.
>> >> >
>> >> > Public Sub OraConnect()
>> >> >    Dim strErr As String
>> >> >    On Error GoTo connError
>> >> >    Set conn = New ADODB.Connection
>> >> >
>> >> >    conn.ConnectionString = "Provider=MSDAORA.1; User
>> >> > ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>> >> >
>> >> >    conn.Open
>> >> >
>> >> >    Set cmd = New ADODB.Command
>> >> >    Set cmd.ActiveConnection = conn
>> >> >
>> >> >    CurrentDb.QueryDefs("qappFIN_CUR_Truncate").Connect =
>> >> > "ODBC;Provider=MSDAORA.1;User ID=GENERIC;Password=GENERIC; Data
>> >> > Source=FIN_CUR;"
>> >> >
>> >> >    DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>> >> >
>> >> >    Exit Sub
>> >> > '
>> >> > ' handle Oracle error
>> >> > '
>> >> > connError:
>> >> >    strErr = "Error connecting to Oracle"
>> >> >    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>> >> >    strErr = "Data Will Not Be Updated"
>> >> >    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>> >> >    strErr = strErr & Err.Number & " " & Err.Description
>> >> >    MsgBox (strErr)
>> >> >
>> >> >    Exit Sub
>> >> > End Sub
>> >> >
>> >> > "Douglas J. Steele" wrote:
>> >> >
>> >> >> Don't you need to specify ODBC in that Connect string, Alex:
>> >> >>
>> >> >>   currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
>> >> >> "ODBC;Provider=MSDAORA.1;
>> >> >> User ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>> >> >>   DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>> >> >>
>> >> >>
>> >> >> -- 
>> >> >> Doug Steele, Microsoft Access MVP
>> >> >> http://I.Am/DougSteele
>> >> >> (no e-mails, please!)
>> >> >>
>> >> >>
>> >> >>
>> >> >> "Alex Dybenko" <alexdyb@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in 
>> >> >> message
>> >> >> news:eInW5JKfKHA.6096@TK2MSFTNGP02.phx.gbl...
>> >> >> > Hi,
>> >> >> > the problem - that DoCmd.OpenQuery has nothing to do with conn
>> >> >> > object.
>> >> >> > If
>> >> >> > you are talking about MDB file and qappFIN_CUR_Truncate is
>> >> >> > pass-through
>> >> >> > query - then you have to set connect property of the query:
>> >> >> >
>> >> >> > currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
>> >> >> > "Provider=MSDAORA.1; User ID=GENERIC;Password=GENERIC; Data
>> >> >> > Source=FIN_CUR;"
>> >> >> > DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>> >> >> >
>> >> >> > -- 
>> >> >> > Best regards,
>> >> >> > ___________
>> >> >> > Alex Dybenko (MVP)
>> >> >> > http://accessblog.net
>> >> >> > http://www.PointLtd.com
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message
>> >> >> > news:CF2A2E7B-55ED-4713-9790-72F4A9512026@microsoft.com...
>> >> >> >> I am using the below code to 1) automatically connect to a
>> >> >> >> Microsoft
>> >> >> >> ODBC
>> >> >> >> for
>> >> >> >> Oracle connection called "FIN_CUR" and 2) run an query on a 
>> >> >> >> linked
>> >> >> >> table
>> >> >> >> in
>> >> >> >> FIN_CUR
>> >> >> >>
>> >> >> >> The issue i am having is that the ODBC connect part of the 
>> >> >> >> script
>> >> >> >> appears
>> >> >> >> to
>> >> >> >> be working, but when it goes to try to run the query I still get
>> >> >> >> the
>> >> >> >> popup
>> >> >> >> prompting for user name and password to make the connection to 
>> >> >> >> the
>> >> >> >> ODBC.
>> >> >> >> I
>> >> >> >> have verify that the user name and password are correct, but 
>> >> >> >> don't
>> >> >> >> know
>> >> >> >> what
>> >> >> >> I am missing.
>> >> >> >>
>> >> >> >> Here is my code
>> >> >> >>
>> >> >> >> Public Sub OraConnect()
>> >> >> >>    Dim strErr As String
>> >> >> >>    On Error GoTo connError
>> >> >> >>    Set conn = New ADODB.Connection
>> >> >> >>
>> >> >> >>    conn.ConnectionString = "Provider=MSDAORA.1; User
>> >> >> >> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>> >> >> >>
>> >> >> >>    conn.Open
>> >> >> >>
>> >> >> >>    Set cmd = New ADODB.Command
>> >> >> >>    Set cmd.ActiveConnection = conn
>> >> >> >>
>> >> >> >>    DoCmd.OpenQuery "qappFIN_CUR_Truncate", , acReadOnly
>> >> >> >>
>> >> >> >>    Exit Sub
>> >> >> >> '
>> >> >> >> ' handle Oracle error
>> >> >> >> '
>> >> >> >> connError:
>> >> >> >>    strErr = "Error connecting to Oracle"
>> >> >> >>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>> >> >> >>    strErr = "Reports will NOT be created"
>> >> >> >>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>> >> >> >>    strErr = strErr & Err.Description
>> >> >> >>    MsgBox (strErr)
>> >> >> >>
>> >> >> >>    Exit Sub
>> >> >> >> End Sub
>> >> >> >
>> >> >>
>> >> >> .
>> >> >>
>> >>
>> >>
>> >> .
>> >>
>>
>> .
>> 

0
Douglas
12/15/2009 12:40:46 PM
Yes, thanks!

to jutlaux - you can open query in design  (SQL) view, open properties, go 
to connect property and build connection by selecting DSN, etc. Then look 
what kind of connection string access built.

-- 
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com


"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in message 
news:ODC6RzLfKHA.2596@TK2MSFTNGP04.phx.gbl...
> Don't you need to specify ODBC in that Connect string, Alex:
>
>  currentdb.querydefs("qappFIN_CUR_Truncate ").Connect = 
> "ODBC;Provider=MSDAORA.1;
> User ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>  DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>
>
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
>
> "Alex Dybenko" <alexdyb@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message 
> news:eInW5JKfKHA.6096@TK2MSFTNGP02.phx.gbl...
>> Hi,
>> the problem - that DoCmd.OpenQuery has nothing to do with conn object. If 
>> you are talking about MDB file and qappFIN_CUR_Truncate is pass-through 
>> query - then you have to set connect property of the query:
>>
>> currentdb.querydefs("qappFIN_CUR_Truncate ").Connect = 
>> "Provider=MSDAORA.1; User ID=GENERIC;Password=GENERIC; Data 
>> Source=FIN_CUR;"
>> DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>>
>> -- 
>> Best regards,
>> ___________
>> Alex Dybenko (MVP)
>> http://accessblog.net
>> http://www.PointLtd.com
>>
>>
>>
>> "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message 
>> news:CF2A2E7B-55ED-4713-9790-72F4A9512026@microsoft.com...
>>> I am using the below code to 1) automatically connect to a Microsoft 
>>> ODBC for
>>> Oracle connection called "FIN_CUR" and 2) run an query on a linked table 
>>> in
>>> FIN_CUR
>>>
>>> The issue i am having is that the ODBC connect part of the script 
>>> appears to
>>> be working, but when it goes to try to run the query I still get the 
>>> popup
>>> prompting for user name and password to make the connection to the ODBC. 
>>> I
>>> have verify that the user name and password are correct, but don't know 
>>> what
>>> I am missing.
>>>
>>> Here is my code
>>>
>>> Public Sub OraConnect()
>>>    Dim strErr As String
>>>    On Error GoTo connError
>>>    Set conn = New ADODB.Connection
>>>
>>>    conn.ConnectionString = "Provider=MSDAORA.1; User
>>> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>>>
>>>    conn.Open
>>>
>>>    Set cmd = New ADODB.Command
>>>    Set cmd.ActiveConnection = conn
>>>
>>>    DoCmd.OpenQuery "qappFIN_CUR_Truncate", , acReadOnly
>>>
>>>    Exit Sub
>>> '
>>> ' handle Oracle error
>>> '
>>> connError:
>>>    strErr = "Error connecting to Oracle"
>>>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>>>    strErr = "Reports will NOT be created"
>>>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>>>    strErr = strErr & Err.Description
>>>    MsgBox (strErr)
>>>
>>>    Exit Sub
>>> End Sub
>>
> 
0
Alex
12/15/2009 2:01:48 PM
Hi there,

Don't know if you've resolved this yet but I thought I'd pop my two
cents worth in here.

I have an Access app that has been running near flawlessly for over
three years. I found the ODBC connection to be problematic. Switched
to OLEDB connection. One thing, it's my understanding that you MUST
have the Oracle client installed in order to connect to an Oracle db.

Below is my simple function for writing a record to the database along
with the connection string (I keep the connection strings in a table
along with some other parameters). Hope it gives you an idea of how to
accomplish what you need to do. As always, watch for line wrap.

Regards,
RD


Connection string:
Provider=OraOLEDB.Oracle.1;Password=carefullprod;Persist Security
Info=True;User ID=carefull;Data Source=carefulldata

Function:
Function fWriteRecord(sSql As String, sConn As String, sDocName As
String) As String
' This function's only job is to take a SQL statement and a connection
' and write a record to the database

On Error GoTo ErrorHandler
Dim cnn As New ADODB.Connection
Dim vRet As Variant

cnn.Open sConn
cnn.Execute sSql
fWriteRecord = "True"

ExitPoint:
Set cnn = Nothing
Exit Function

ErrorHandler:
Debug.Print Err.Number & ": " & Err.Description
vRet = fWriteLog(sDocName, Err.Number & ": " & Err.Description, "NA",
"fWriteRecord")
fWriteRecord = "Error: " & Err.Number & " occurred when attempting to
write record."
Resume ExitPoint
End Function


On Mon, 14 Dec 2009 19:41:02 -0800, jutlaux
<jutlaux@discussions.microsoft.com> wrote:

>I did.  Here is the script as it stands right now.
>
>Public Sub OraConnect2()
>    Dim strErr As String
>    On Error GoTo connError
>
>    CurrentDb.QueryDefs("qappFIN_CUR_Truncate").Connect = "ODBC;Data 
>Source=FIN_CUR;User ID=GENERIC;Password=GENERIC"
>    
>    DoCmd.OpenQuery "qappFIN_CUR_Truncate" ', , acReadOnly
>    
>    Exit Sub
>'
>' handle Oracle error
>'
>connError:
>    strErr = "Error connecting to Oracle"
>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>    strErr = "Data Will Not Be Updated"
>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>    strErr = strErr & Err.Number & " " & Err.Description
>    MsgBox (strErr)
>
>    Exit Sub
>End Sub
>
>"Douglas J. Steele" wrote:
>
>> Did you put in the ODBC at the beginning, as I suggested?
>> 
>>   currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
>> "ODBC;Provider=MSDAORA.1;User ID=GENERIC;Password=GENERIC; Data 
>> Source=FIN_CUR;"
>>   DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>> 
>> 
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>> 
>> 
>> 
>> "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message 
>> news:1A4D04FA-D499-4ECE-8816-4EB34A79E823@microsoft.com...
>> > Deleted all code as you suggested.  The data source does exist and was 
>> > setup
>> > under the System DSN and I have verified that supplied user name and 
>> > password
>> > are valid and work.
>> >
>> > "Douglas J. Steele" wrote:
>> >
>> >> First of all, you don't need the code
>> >>
>> >>     Set conn = New ADODB.Connection
>> >>
>> >>     conn.ConnectionString = "Provider=MSDAORA.1; User
>> >> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>> >>
>> >>     conn.Open
>> >>
>> >>     Set cmd = New ADODB.Command
>> >>     Set cmd.ActiveConnection = conn
>> >>
>> >> It's doing absolutely nothing!
>> >>
>> >> Does the data source FIN_CUR exist?
>> >>
>> >> -- 
>> >> Doug Steele, Microsoft Access MVP
>> >> http://I.Am/DougSteele
>> >> (no private e-mails, please)
>> >>
>> >>
>> >> "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message
>> >> news:B218383D-4AEC-4B90-A015-BE2D7D90162D@microsoft.com...
>> >> >
>> >> > I have modified my code to reflect your responses.  Now when it gets to
>> >> > the
>> >> > Docmd.Open query I get a pop up to select data source instead of it
>> >> > running
>> >> > the query.
>> >> >
>> >> > Public Sub OraConnect()
>> >> >    Dim strErr As String
>> >> >    On Error GoTo connError
>> >> >    Set conn = New ADODB.Connection
>> >> >
>> >> >    conn.ConnectionString = "Provider=MSDAORA.1; User
>> >> > ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>> >> >
>> >> >    conn.Open
>> >> >
>> >> >    Set cmd = New ADODB.Command
>> >> >    Set cmd.ActiveConnection = conn
>> >> >
>> >> >    CurrentDb.QueryDefs("qappFIN_CUR_Truncate").Connect =
>> >> > "ODBC;Provider=MSDAORA.1;User ID=GENERIC;Password=GENERIC; Data
>> >> > Source=FIN_CUR;"
>> >> >
>> >> >    DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>> >> >
>> >> >    Exit Sub
>> >> > '
>> >> > ' handle Oracle error
>> >> > '
>> >> > connError:
>> >> >    strErr = "Error connecting to Oracle"
>> >> >    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>> >> >    strErr = "Data Will Not Be Updated"
>> >> >    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>> >> >    strErr = strErr & Err.Number & " " & Err.Description
>> >> >    MsgBox (strErr)
>> >> >
>> >> >    Exit Sub
>> >> > End Sub
>> >> >
>> >> > "Douglas J. Steele" wrote:
>> >> >
>> >> >> Don't you need to specify ODBC in that Connect string, Alex:
>> >> >>
>> >> >>   currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
>> >> >> "ODBC;Provider=MSDAORA.1;
>> >> >> User ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>> >> >>   DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>> >> >>
>> >> >>
>> >> >> -- 
>> >> >> Doug Steele, Microsoft Access MVP
>> >> >> http://I.Am/DougSteele
>> >> >> (no e-mails, please!)
>> >> >>
>> >> >>
>> >> >>
>> >> >> "Alex Dybenko" <alexdyb@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message
>> >> >> news:eInW5JKfKHA.6096@TK2MSFTNGP02.phx.gbl...
>> >> >> > Hi,
>> >> >> > the problem - that DoCmd.OpenQuery has nothing to do with conn 
>> >> >> > object.
>> >> >> > If
>> >> >> > you are talking about MDB file and qappFIN_CUR_Truncate is 
>> >> >> > pass-through
>> >> >> > query - then you have to set connect property of the query:
>> >> >> >
>> >> >> > currentdb.querydefs("qappFIN_CUR_Truncate ").Connect =
>> >> >> > "Provider=MSDAORA.1; User ID=GENERIC;Password=GENERIC; Data
>> >> >> > Source=FIN_CUR;"
>> >> >> > DoCmd.OpenQuery "qappFIN_CUR_Truncate"
>> >> >> >
>> >> >> > -- 
>> >> >> > Best regards,
>> >> >> > ___________
>> >> >> > Alex Dybenko (MVP)
>> >> >> > http://accessblog.net
>> >> >> > http://www.PointLtd.com
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > "jutlaux" <jutlaux@discussions.microsoft.com> wrote in message
>> >> >> > news:CF2A2E7B-55ED-4713-9790-72F4A9512026@microsoft.com...
>> >> >> >> I am using the below code to 1) automatically connect to a 
>> >> >> >> Microsoft
>> >> >> >> ODBC
>> >> >> >> for
>> >> >> >> Oracle connection called "FIN_CUR" and 2) run an query on a linked
>> >> >> >> table
>> >> >> >> in
>> >> >> >> FIN_CUR
>> >> >> >>
>> >> >> >> The issue i am having is that the ODBC connect part of the script
>> >> >> >> appears
>> >> >> >> to
>> >> >> >> be working, but when it goes to try to run the query I still get 
>> >> >> >> the
>> >> >> >> popup
>> >> >> >> prompting for user name and password to make the connection to the
>> >> >> >> ODBC.
>> >> >> >> I
>> >> >> >> have verify that the user name and password are correct, but don't
>> >> >> >> know
>> >> >> >> what
>> >> >> >> I am missing.
>> >> >> >>
>> >> >> >> Here is my code
>> >> >> >>
>> >> >> >> Public Sub OraConnect()
>> >> >> >>    Dim strErr As String
>> >> >> >>    On Error GoTo connError
>> >> >> >>    Set conn = New ADODB.Connection
>> >> >> >>
>> >> >> >>    conn.ConnectionString = "Provider=MSDAORA.1; User
>> >> >> >> ID=GENERIC;Password=GENERIC; Data Source=FIN_CUR;"
>> >> >> >>
>> >> >> >>    conn.Open
>> >> >> >>
>> >> >> >>    Set cmd = New ADODB.Command
>> >> >> >>    Set cmd.ActiveConnection = conn
>> >> >> >>
>> >> >> >>    DoCmd.OpenQuery "qappFIN_CUR_Truncate", , acReadOnly
>> >> >> >>
>> >> >> >>    Exit Sub
>> >> >> >> '
>> >> >> >> ' handle Oracle error
>> >> >> >> '
>> >> >> >> connError:
>> >> >> >>    strErr = "Error connecting to Oracle"
>> >> >> >>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>> >> >> >>    strErr = "Reports will NOT be created"
>> >> >> >>    strErr = strErr & Chr(13) & Chr(10) & Chr(13) & Chr(10)
>> >> >> >>    strErr = strErr & Err.Description
>> >> >> >>    MsgBox (strErr)
>> >> >> >>
>> >> >> >>    Exit Sub
>> >> >> >> End Sub
>> >> >> >
>> >> >>
>> >> >> .
>> >> >>
>> >>
>> >>
>> >> .
>> >> 
>> 
>> .
>> 

0
Pope
12/16/2009 11:32:28 PM
On Wed, 16 Dec 2009 15:32:28 -0800, Pope Rudraigh <laughing@your.ass>
wrote:

Sorry about those headers. I sometimes forget to clean up after
myself.

:-)

0
RD
12/17/2009 12:22:02 AM
Reply:

Similar Artilces:

Win98 SE, Office 2000: ODBC from Excel behaves strangely on one computer
Hi When I create an ODBC query from another Excel workbook, using query wizard, then usually after I select the workbook as data source, in wizard's next window all available tables (defined non-dynamic named ranges in this workbook) are displayed, ans I'm asked to select columns. The source workbook remains closed. Now in one single computer, after I select the workbook as data source, this workbook is opened and recalculated automatically, and only after that the wizard continues with next window. And when I open some workbook, containing such ODBC query, or when I try to refresh s...

Outlook CRM client connect error after password change
When a laptop users changes their password when prompted, they launch the web version of CRM fine. But the Outlook client fails with the failure to load crm funtionality error because it can't authenticate. I have cleared out the IE passwords and locked the workstation to update with windows password cache but the Outlook client still fails. Where else could the password be stored or cached? Andrew. Update password at below location: Start >> Settings >> Control Panel >> User Accounts >> SELECT YOUR USERNAME >> Manage my network passwords I hope t...

Odbc #2
I have created a spreadsheet to extract data from Sage accounts usin ODBC. My accounts package is multi-company so there is a separate dat source for each company. These data sources contain exactly the sam fields but different data. I would like to use the same spreadsheet with a new data source probably by making a copy of it and somehow pointing the existing quer to one of the other data sources. Can this be done or do I just hav to start again -- Message posted from http://www.ExcelForum.com ...

odbc
instead of converting from excel to access, and cut and paste. Is it possible to make an ODBC connection to an ACCESS database that has many calculations Um, doesn't it depend on how the calculations are done? If there are queries that include user-defined functions, you're not going to be able to use them through ODBC. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele "david epsom dot com dot au" <david@epsomdotcomdotau> wrote in message news:#a8OyOfaDHA.1744@TK2MSFTNGP12.phx.gbl... > Yes. > "Daina" <dainadane@hotmail.com> wrote in...

How to move connection point inside endpoint
I am trying to create a shape that acts like a line but with border and fill properties like other shapes. The line properties I want are: * Can be drawn at any angle (rotated without the rotate tool). * Connect to each other at the end points. * End points are inside the thickness. That last property is critical. When I make a like thicker, the thickness extends beyond the connection point, making the line a little longer. This makes the connections look right, especially with rounded caps. John showed me how to make a rectangle shape behave like a line by setting the line (1-dimensional)...

outlook can not connect to the internet
I just installed outlook 2003 and when I try to load it it directs me to set up an e-mail account. When I do this thw e-mail manager says it can not connect to the internet. I can browse the web fine. Any ideas? stevechild <stevechild@discussions.microsoft.com> wrote: > I just installed outlook 2003 and when I try to load it it directs me > to set up an e-mail account. When I do this thw e-mail manager says > it can not connect to the internet. I can browse the web fine. Any > ideas? Please list the exact steps you take to create the account. -- Brian Tillman ...

OWA 2003 connect failure with HTTP 404
Windows 2003 SP1 with newly installed Exchange Server 2003 SP2 as a mailbox server OWA users failed to log on with HTTP error 404 right from day one after installation Right-clicking Exchange virtual directory in IIS Manager and choose Explore resulted in "Page cannot be displayed". Wasn't this supposed to display the folders in the mailbox root? Right-clicking "Exchange virtual directory" in IIS Manager and choose Browse resulted in "Page cannot be found". The "Local Path" field of Exchange virtual directory does show "\\.\BackOffice...

POP3 not connecting
I have a random problem with users getting a "cannot connect to POP3 server" message & not receiving mail. The POP3 address is correct. The mail site is up & working fine - in fact I can visit that URL at the same time I'm getting the "POP3" message & it goes there just fine. If we re-boot, it will connect right up & no more problems with Outlook finding the site... I have 40 users on a win2000 server network with exchange2000 running & Outlook2000 client on each machine. This problem comes up on 1 - 2 users per day Joe Rogers wrote: &g...

odbc
I've got a problem with inserting image to database. I've got a CByteArray m_pic and CFile file: [...] file.Open(filePath, CFile::modeRead | CFile::shareDenyNone); m_pic.SetSize(file.GetLength()); [...] How can I send it to database now? If I want to update record in database i usually do it like that: [...] CString SQL; SQL.Format("update TABLE set FIELD='%s' where id=%u", newFieldValue, id); dataBase DB; if(!DB.db.IsOpen()){ if(!DB.DBConnect()) return -1; } DB.db.ExecuteSQL(SQL); [...] ArtuS ...

Reminders keep appearing in Outlook 2007 Windows 7 Outlook Connect
Hi all, I'm currently using Outlook Connector with Outlook 2007 on Windows 7 and the problem I keep experiencing is that reminders from my Hotmail account keep appearing every time Outlook synchronizes with Hotmail. I repeatedly dismiss the reminders, yet they reappear until the event passes. I've tried setting the reminder interval on Hotmail to a shorter period of time compared with Outlook's, but this hasn't worked (it was a suggestion posted elsewhere). I don't need to 'clean' the reminders when I open Outlook because I'm not experiencing th...

Outlook client cant connect to server
Laptop member of domain. The installation went without error. The CRM tray icon says online but as soon as I open outlook it goes disabled and Outlook give me 2 errors " “cannot connect to the Microsoft CRM server. This might indicate that the server is down” "an error occured loading microsoft crm functionality, try restarting microsoft outlook. contact your system administrator if errors persist.” I have no problem with starting CRM from the same PC/User in IE. I dont know - but might the problem could bee in the serverurl in registry. The CRM are installede on Default web o...

ODBC Pass-Through Queries
Is there a way to pass parameters to a server via ODBC Pass-Through queries in Access? Example: Doing a "select * from ThisTable" on a certain table in Oracle 10g at work (or linking to it via Access) produces errors when viewing the table. Namely the error in question is "Insufficient parallel query slaves available". This can be easily fixed in a native Oracle session by issuing the following commands: ALTER SESSION SET PARALLEL_MIN_PERCENT=0; SELECT * FROM ThisTable; This changes the session so that if there aren't enough parallel query slaves available to...

Lost Connection to Public Folders
Hello All, I think I just shot my self in the foot and set the "Everyone" usr permissions to DENY on my Public Folders. Now I cannot view my Public Folders Tree within the Exchange System Manager. Is there any way I can reverse this so that I can view my public folders again. Thanks, Eric Pls run Forestprep and Domainprep in your exchange server again!If you are Windows 2000 DC Domain it will reset Exchange permission! Or you can using ADSI , find the public folder object and reset the permission http://support.microsoft.com/default.aspx?scid=kb;en-us;823017 -- Jammyù...

Direct Connect Banking w/Microsoft Money?
Hello all. Now that Netbank is being sold to Everbank I'm going to have to find another bank to do direct connect bill pay, account transactions, etc. Can anyone recommend their bank or know of another one that is like Netbank? I want to continue being able to do all my transactions within Money and not have to go to a bank's web site nor do I want to do that LiveID thing. Thanks, Richard ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast ...

ODBC Error
Currently can't find a more specific place to post this message, so... I'm trying to troubleshoot an ODBC error and I haven't worked with this in a very long time. We have several Windows 7 64 bit PCs that generate errors when trying to configure User DSNs. When I highlight any of them (I.e. MS Access Database) then click Configure I get the following two errors (and I'll use MS Access in this case): "The setup routines for the Microsoft Access Driver (*.mdb, *.accdb) ODBC driver could not be found. Please install the driver." I click OK then: ...

ODBC and DSN
How I can access directly to an ODBC database with out using DSN (Data Source Name). I careated an Access database (*.mdb). I want to access to this database's file directly from my application, and don't use DSN, Because every time that I run my application in each machine I must create DSN manualy. Is there any way to create DSN automatically or How I can access to this file directly? Thanks Take a look at the following website. http://www.connectionstrings.com/ -- Cheers Check Abdoul [VC++ MVP] ----------------------------------- "jamborz" <anonymous...

Smartlist Builder ODBC error
We are receiving the following error message in Smartlist Builder regardless of whether or not we have selected the boxes to allow ANSI_NULLS and ANSI_WARNINGS in the configuration settings for the ODBC. GPS Error 58 SQL Error 7405 ODBC SQL server driver heterogeneous queries require the ANSI_NULL and ANSI_Warnings options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query. ODBC error 37000 Same messge whether those options are marked or unmarked. I haven't been able to find anything in Partnersource that...

Outlook Client with NT Computer(NT 4.0 and 2000 Pro) Can't connect to server.
I have problem with Client to connect to Exchange 2000 Server. Clients with Window 98 and 2000 pro work within the same subnet, and a few with NT and 2000 Pro don't work with the different subnets, even though Outlook Web Access is working fine and network access is working properly. I figured that this is not network problem because by using UNC, Client computer can see Server computer and access to it. It is not the Account problem either. I also used an admin account. I still can't connect. It is too unprofessional to blame microsoft for this, but Microsoft didn't have ...

32
Hey group! I'm quite new to this ODBC and would really like it if you could clear up some of my queries...I apologize if some of the questions seem ridiculous...:))) Im trying to get my C# .NET application running on a 64 bit machine and am facing a few problems. The app makes use of an odbc connection and this is where I am getting confused and I havent been able to get any reliable sources online... What is the difference between a 32 bit odbc and a 64 bit odbc connection? Can a 64 bit Application make use of a 32 bit odbc connection? Can a 32 bit Application make use of a 64 bit O...

POP 3 connectivity
I installed SBS with sr 1 server service pack and SBS sr1 service pack and Exchange Sr2. On the same server I can browse the mailbox with internet explorer on Outlook web access when i created the same account in Outlook express on the same server when i do F5 it dose send and receive mail but it dosenot download messages in Outlook Express . Please advice? Sarosh Tafti wrote: > I installed SBS with sr 1 server service pack and SBS sr1 service pack and > Exchange Sr2. > On the same server I can browse the mailbox with internet explorer on > Outlook web access when i created ...

How to stop active net connection for a while #2
Hi, it is a different query ?. I want to disable the active internet connection for a while and want to resume later !. Any idea will be appreciated ! ...

KB899912
899912 Error Message 5/26/2005 You receive an "A connection cannot be established at this time. Please try again later" error message when you register Microsoft CRM Mobile on a Pocket PC device. I found this KB#/listing on this site: http://www.sonomapartners.com/microsoft-crm-support-articles-may2005.aspx Apparently to get the KB I need some kind of special login which I don't have. Any change someone is able to retrieve this info and post here? I'm desperate for a solution... You are supposed to be able to login to either of these sites below for the article: htt...

connection to sql -server
Hi I am just looking at using MFC to write information into an SQL-SERVER database the database is located on our company webserver the MFC application runs on local desktop machines and can access the server using an IP address Fs there a way to extract data from the remote SQL-SERVER database using MFC If so what do I use as the connection string Do I have to configure the server to accept calls to the SQL-server Sorry if this is trivial question but I'm a bit stuck on this Hope someone can help Phil use ado ...... google for "using ado with vc++" "phil" ...

ODBC driver for Microsoft CRM
Does anyone know if there is or are any plans to have some sort of ODBC / OLEDB driver for Microsoft CRM. This would be great if you are writing reports in something other than Crystal, for example SQL Reporting services. TIA If you really want it, the data is available directly from SQL. However, this approach will not enforce the data security that is provided via the CRM enhancements. I have not heard of any plans to change this in future releases. Matt On Wed, 04 Feb 2004 03:43:49 -0800, Karl Iuel <Nospam@Nospam.com> wrote: Does anyone know if there is or are any plans to ha...

changing add in "odbc" setting in excel
I am running office 2002 (XP) and I downloaded the odbc add in in the directory "c:\program files\microsoft office\office10\library\msquery\" (I need it to have it here to run some queries). If I go to Tools-Add ins and change odbc inn using the brwosing option, it works fine but when clossing excel and opening it up again, I get and error saying the path is wrong and it is looking into "c:\program files\microsoft office\office10\library\" Any ideas in how to change the default path? Thanks ...