ODBC and VC++ works on NT but not Windows 95

ODBC and VC++ works on NT but not Windows 95

Post by Martin Korsru » Fri, 23 May 1997 04:00:00



I'm currently creating an application that uses ODBC to connect to
datasources. The ODBC stuff (SQLConnect, SQLAllocStmt ...) is implemented
in C++ classes in a DLL.

When my main application runs under Windows NT, everything works OK.

Under Windows 95 (With Service pack 1) everyting RUNS ok, but when the DLL
unloads it creates a Access Violation in KERNEL32.  The SQLFreeStmt
function seems to be  the one creating this Access Violation.

I'm currently using VC++ 5.0 but the problem existed under 4.1 and 4.2
also.

Any sugestions, anyone ????

 
 
 

ODBC and VC++ works on NT but not Windows 95

Post by Wally Bergset » Sat, 24 May 1997 04:00:00


Did you install the ODBC 3.0 drivers on windows 95?
95 comes with the 2.0 drivers.

 
 
 

ODBC and VC++ works on NT but not Windows 95

Post by Lionel Lavalle » Sat, 24 May 1997 04:00:00



> I'm currently creating an application that uses ODBC to connect to
> datasources. The ODBC stuff (SQLConnect, SQLAllocStmt ...) is
> implemented
> in C++ classes in a DLL.

> When my main application runs under Windows NT, everything works OK.

> Under Windows 95 (With Service pack 1) everyting RUNS ok, but when
> the DLL
> unloads it creates a Access Violation in KERNEL32.  The SQLFreeStmt
> function seems to be  the one creating this Access Violation.

> I'm currently using VC++ 5.0 but the problem existed under 4.1 and
> 4.2
> also.

> Any sugestions, anyone ????

 This looks exactly like a problem I'm having using the ODBC 3.0 drivers
and MSVC 5.0. Check out my posting in microsoft.public.odbc.sdk (search
for my last name as the sender).

Lionel Lavallee
Symantec Corp.

 
 
 

ODBC and VC++ works on NT but not Windows 95

Post by Martin Korsru » Tue, 27 May 1997 04:00:00




Quote:> Did you install the ODBC 3.0 drivers on windows 95?
> 95 comes with the 2.0 drivers.

Yes, ODBC 3.0 drivers are installed on Windows 95.

Is this a possible source for the error ??

Martin,
Contec Design AS
Norway

 
 
 

ODBC and VC++ works on NT but not Windows 95

Post by Brian V. Shifri » Fri, 06 Jun 1997 04:00:00


I have the same bug under VC 5.0 NT4 (no SP) attempting to disconnect
from Oracle 7.2.3.

If SQLSetConnectOptions set to one of the 'pools'
SQLFreeConnect return GPF.

Some limited solution is delay SQLDisconnect and SQLFree....
The problem easy to reproduce with ODBC test.

Brian
(Intersolv, who's drivers I am using denied ever knowning about this)




> > Greetings all,

> > This sound very like a bug I am chasing: hope no one minds
> > if I jump in.

> > I am currently completing a 16 bit application for a
> > client using MFC 1.52
> > and ODBC 2.X to access and MS Access database. The
> > database is accessed via
> > an AFX DLL. There are two clients, each with their own
> > database resources.

> > Problem 1:
> > After a hard reboot the following will cause a crash:
> > Client 1 starts and opens the database.
> > Client 2 starts and opens the database.
> > Client 1 exits and closes the database.
> > Client 2 exits and crashes when closing the database
> > (CDatabase::Close()).

> > If I remember correctly, it was in the call to
> > SQLDisconnect(). The error
> > is an illegal page fault in kernel32.dll.

> > What I guess is happening:
> > It appears some global resources are being allocated to
> > client 1. When
> > client 1 goes away, the resources are freed but
> > handle/pointer still exists
> > to resources. When client 2 tries to free the resources
> > (which are no
> > longer there) is causes the page fault and crashes.

> > The crash occurs in Win95 but not WinNT 4 (SP3)

> > It this is the same problem, it has been around for a
> > while.

> > Problem 2
> > To work around problem 1, I have the DLL creating a
> > database object and
> > opening the database before any clients have initialized
> > the AFX DLL so the
> > database is in the DLL memory space (and theoretically all
> > initial
> > resources are in DLL memory space.) All global resources
> > should initially
> > be created in DLL memory space. Since DLL is first to
> > allocate and last to
> > deallocate, the page fault should be avoided.

> > The crash of problem 1 is resolved and DLL seems to close
> > down OK.
> > However, after the 10th time we crash on database open.
> > The crash is in one
> > of the ODBC support drivers (most frequently VBAR2.DLL).

> > What I think is happening now:
> > There is some connection/resource which is not being freed
> > from DLL
> > database instance. After the tenth allocation, the driver
> > has maxed out and
> > crashes with GPF.

> > Anyone have other ideas?

> > ---

> > Information Integrity, Inc.
> > MS Windows Consulting
> > (508) 897-0801



> > > I'm currently creating an application that uses ODBC to
> > connect to
> > > datasources. The ODBC stuff (SQLConnect, SQLAllocStmt
> > ...) is implemented
> > > in C++ classes in a DLL.

> > > When my main application runs under Windows NT,
> > everything works OK.

> > > Under Windows 95 (With Service pack 1) everyting RUNS
> > ok, but when the
> > DLL
> > > unloads it creates a Access Violation in KERNEL32.  The
> > SQLFreeStmt
> > > function seems to be  the one creating this Access
> > Violation.

> > > I'm currently using VC++ 5.0 but the problem existed
> > under 4.1 and 4.2
> > > also.

> > > Any sugestions, anyone ????

>   Blake and all.

> Check out bug #Q167731 on known MSVC bugs. In vesions from
> 4.2 on there is apparently some mismanagement of pointers in
> ODBC. They claim that the problem is fixed in the version
> 3.0 drivers, but I'm running into the same thing you mention
> above. Has to do with the SQLSetConnectOptions that is
> invoked during connection to DB.

> I have posted a bug up on their support line, but we'll
> see...

> Lionel
> Symantec Corporation

 
 
 

1. 24007-NJ-Warren-PC-Windows 95-Windows NT-SYBASE-Windows NT-ORACLE-Crystal Info-Programmer

******** VISIT US AT http://www.selectjobs.com ***********
=
*************************************************************
Company    : Technisource
Website    : http://www.tsi.net
Job Title  : Programmer
Location   : Warren, NJ
Job Type   : Contract
============================
Technisource is an innovative and rapidly growing national contract, consulting
and staffing organization Technisource has a long list of satisfied clients and
hundreds of high caliber consultants with rewarding careers in the technical
industry Technisource offers the best solution whether our clients' needs are
for one engineer, a team or a complete outsourcing unit Since 1987 Technisource
has specialized in the technical consulting industry and is the most qualified
resource to turn for your next project Over 600 opportunities are listed on our
website, WWWTSINET for engineers, programmers, designers, technicians and
technical writers

 PC (IBM or Compatible), Windows 95, Windows NT, and CRYSTAL INFO 4 or 5
required Oracle, Sybase and NT Servers desired DURATION 6 - 9 months

Travel Required          :None
Educational Requirements :None
=
Required Skills
* PC
* Windows 95
* Windows NT
* SYBASE
* Windows NT  Version: Servers
* ORACLE
* Crystal Info  Version: 4/5
=
=
Contact Information:
Reference : NJ10962

Technisource
1901 NW 62nd St.,  #401

Ft. Lauderdale, FL 33309

Phone: 800-940-1111 EXT 237
   -   -
Fax No: 888-290-2990
***********************  http://www.selectjobs.com  ****************************

                The On-Line, On-Target Job Finder for Computer Professionals

** Post Your Resume and see results immediately!! ** Always free **
** Post jobs for 30 days for $40, unlimited postings $250/month
** Matching Resumes E-mailed daily
**  Your ads are virtually guaranteed to be seen by jobseekers on the NET' **

                    ** Automatic Posting to **
   ** Yahoo            ** Americas Job Bank    ** Career City
   ** HeadHunter.Net   ** Classifieds 2000     ** Usenet Newsgroups
               *** OVER 20 MILLION HITS/MONTH COMBINED !!! ***

***********************  http://www.selectjobs.com  ****************************

2. Disconnected Recordset: Not editable SQL-JOIN used

3. SQLDriverConnect works in WinNT 4.0 but not Windows 95

4. Using BYTE variables in Memory in Informix On Line

5. CreateObject(MAPI.Session) DOES NOT work on Windows 95

6. S T I L L locked out....

7. VA-Richmond-239904--Windows 98-Windows NT-Windows 95-Novell-Senior Operator

8. Lost Temporary tables in version 4.5 for DOS

9. SET FILTER (VFP) - Works on NT, not on 95