From owner-freebsd-database Fri Aug 14 14:27:27 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA16515 for freebsd-database-outgoing; Fri, 14 Aug 1998 14:27:27 -0700 (PDT) (envelope-from owner-freebsd-database@FreeBSD.ORG) Received: from skylink.skylink.net (skylink.skylink.net [206.25.34.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA16510 for ; Fri, 14 Aug 1998 14:27:24 -0700 (PDT) (envelope-from animal@skylink.net) Received: from shell.skylink.net (animal@shell.skylink.net [206.25.34.5]) by skylink.skylink.net (8.8.8/8.8.8) with SMTP id OAA19304 for ; Fri, 14 Aug 1998 14:26:55 -0700 (PDT) Date: Fri, 14 Aug 1998 14:26:55 -0700 (PDT) From: animal To: freebsd-database@FreeBSD.ORG Subject: .dir .pag .db Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-database@FreeBSD.ORG Precedence: bulk I am for one haveing a hard time even getiing any documentation on all of these.... When i create a database with perl it makes a .db..... but i am trying to compile a c prog that will add keys to a data base... can you tell me what i am doing wrong.... I use this to create the database...... #include #include #include main() { DBM *db; db = dbm_open("/usr/local/radius/users",O_CREAT,0000664); dbm_close(db); } and then i am trying to add data to it by.......... #include #include #include main() { DBM *db datum kename,whatto; db = dbm_open("/usr/local/radius/users",O_WRONLY,0000664); kename.dptr = "animal"; kename.dsize = strlen(kename.dptr)+1; whatto.dptr = "Data to be stored in database"; kename.dsize = strlen(whatto.dptr)+1; if (dbm_store(db,kename,whatto,DBM_INSERT) < 0) { printf("Insert messed up"); } dbm_close(db); } both progs compile correctly and the create one works fine gives me a file of -rw-r--r-- 1 root wheel 0 Aug 14 14:24 users.db but when i run the second one to insert a key and some data..... i get Segmentation fault (core dumped) any suggestions..... i am probably even in the wrong mailing list... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-database" in the body of the message