Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Jeff Lu" To: Subject: Why is the handle returned by dbm_open NULL? Date: Tue, 12 Dec 2000 00:27:38 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Hi, I'm trying to save some data using dbm, dbm_open creates the file but the returned file handle is null. The same code works in Unix/Linux. Here's the code: dbm_local = dbm_open (database, O_RDWR|O_CREAT, 00664); if(dbm_local) { strcpy(buffer, "CurrentOrderNumber"); key.dptr = buffer; key.dsize = strlen(buffer)+1; return_data = dbm_fetch(dbm_local, key); if(return_data.dptr) sprintf(count, "%d", atoi(return_data.dptr)+1); else strcpy(count, "1"); data_data.dptr = count; data_data.dsize = strlen(count)+1; dbm_store(dbm_local, key, data_data, DBM_REPLACE); dbm_close (dbm_local); } Thanks -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com