Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to make connection to the local database using Personal Oracle 7.2
This worked very well. TNSPING worked after doing this. Then, I tried the example Borland C++ ping program and it also worked. Seeing as how my original goal of all this was to connect to Oracle from C++ I figured things were looking good. So I then tried to use what I've learned here in my own program:
I'm trying to connect to the local Personal Oracle7 database with the following code. I got most of this code from the dbping example program included with the BDE32 examples, which works fine.
When I run the code, I get the Environment Initialized message box. When I dismiss that, I get the hDb Is Null message box. When I dismiss that, the Oracle database starts up. So far, so good.
After the database starts up, the machine cranks for a while and then I get a dialog which reports the following:
Thread stopped
C:\BC5\ORCLTEST\orcltest.exe
Fault: access violation at 0x4bde36co:
read of address 0xffffffff
When I return to the BC5 IDE, I have a debudding window that is titled
CPU Thread 1 with about four panes which I don't really know how to
interpret. However, there is a line highlighted with an arrow
pointing to it which says:
4BDE36CO mov [exc], eax
Please explain to me what these messages mean and what I am doing wrong. I'm guessing I have a wild pointer somewhere??
Thanks
Greg Teets
Cincinnati, OH
teetshd_at_ucbeh.san.uc.edu
void TOrcltestDlgClient::OpenDatabase()
{
hDBIDb* hDb;
hDb = NULL;
if (DbiInit(NULL) == DBIERR_NONE)
{
MessageBox("Environment Initialized", "Progress");
if (!hDb)
{ MessageBox("hDb is null", "Status"); } else { MessageBox("hDb is not null", "Status"); } if (DbiOpenDatabase("Quotes", "ODBC_Stocks", dbiREADWRITE, dbiOPENSHARED, "DAD", 0, NULL, NULL, &hDb) == DBIERR_NONE) { MessageBox("Database Opened", "Progress"); } else { MessageBox("Could not open database", "Error"); }
}
else
{
MessageBox("Failed to Initialize BDE", "Error");
}
}
On Mon, 19 Jan 1998 07:42:37 +0200, "Billy Verreynne" <vslabs_at_onwe.co.za> wrote:
>Greg Teets wrote in message <34c1640b.405768_at_news.ececs.uc.edu>...
>>I set up Tcp-loopback as you suggested and I got the following
>>no-listener message.
>
>
>You need to edit the LISTENER.ORA file in \ORAWIN95\NETWORK\ADMIN and create
>an entry for your database/SID where the IP address equals loopback.
>
>Start the listener (in \ORAWIN95\BIN) with LSNRCTL START. Then try TNSPING
>again.
>
>regards,
>Billy
>
>
>
Received on Thu Jan 22 1998 - 00:00:00 CST