Sponsored Content
Full Discussion: Create a database in C
Top Forums Programming Create a database in C Post 302560303 by Corona688 on Thursday 29th of September 2011 11:49:08 AM
Old 09-29-2011
The compiler just tells you whether your code is syntactically correct, it doesn't tell you whether it works. It doesn't care whether your program cuts off its own foot as you end it in a semicolon.

Your problem in the other thread wasn't allocating memory. There's nothing wrong with the way you called malloc(). The problem was what you did with the memory after. You kept free()ing things you still needed, using the wrong pointers, accidentally overwriting things, etc. Your algorithm made no sense, and I couldn't correct it because you never explained what you were actually trying to do except in a generic "it uses memory" kind of way.

What you do with memory depends on how you want to arrange it and what you're putting in it.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

trying to create a virtual database..

:cool: I like Vibhory2 like the idea of tapping into the kernel.. although not as indepth as he/she... i want to create a virtual databse of a few ma chines with connectivity and defiinte knowledge to create it.. I havebeen working on the project for a year now.. ! before unix (1 year exactly) i... (20 Replies)
Discussion started by: moxxx68
20 Replies

2. UNIX for Advanced & Expert Users

create database on unix

how can i create database on unix from command line (without using DBCA) (2 Replies)
Discussion started by: gfhgfnhhn
2 Replies

3. Solaris

Can't create database after Oracle Database installation

I installed Oracle 10 software on Solaris 11 Express, everything was fine execpt I can't create database using dbca.rsp file. I populated file with following options. OPERATION_TYPE = "createDatabase" GDBNAME = "solaris_user.domain.com" SID = "solaris_user" TEMPLATENAME = "General... (0 Replies)
Discussion started by: solaris_user
0 Replies

4. Shell Programming and Scripting

Create database using Backup file

Hi, I have backup file of database in my server. I want to create a that database in the same Mysql Server. How can I do that? Please send the steps to create the database using backup file? Thanks a lot, (1 Reply)
Discussion started by: aish11
1 Replies

5. Programming

Creating a bash script that create/open database

Hi. I have two text files(tables) which include some information and I want to make some query codes using them. First of all, I want to create bash script that read this two tables, create/open database and insert data from files into database. #!/bin/bash while read line; do ... (1 Reply)
Discussion started by: rlaxodus
1 Replies

6. UNIX and Linux Applications

Really simple shell script to create oracle database

Hello , I am new in this forum and need your help as I am totally confused :confused: I read a lot of threads and tried to search a lot but did not get the exact answer to my question. I just want a simple (content wise may be long) shell script to create oracle database. In detail:... (5 Replies)
Discussion started by: rahoolm
5 Replies

7. Shell Programming and Scripting

Help with script to create users from database query

#!/bin/bash user=`mysql userList -uuserlist -puserlistpassword -s -N -e "SELECT userName FROM users WHERE activated='n'"` for i in $user; do useradd "$i" -m doneThis is what I have done so far. But obviously it still does not work. I'm trying to create users based on information stored in a... (5 Replies)
Discussion started by: bucketuk
5 Replies

8. UNIX for Dummies Questions & Answers

Create Alert for Database Problem

Hi all, I new to scripting and i need to know how to put the script when the capture goes down in the feeds database.. I tried with this "ps -ef | grep asn" command and it displaying the capture,apply time. But the alert we are receving now is replication is failed . So i need to develop the... (1 Reply)
Discussion started by: g.nanthagopal
1 Replies

9. AIX

Need a graphical interface on AIX server to create database

Hello, Please suggest me the ways how to get graphical interface on AIX server.I need to create oracle database for which I need graphical access. Best regards, Vishal (4 Replies)
Discussion started by: Vishal_dba
4 Replies

10. Shell Programming and Scripting

awk parsing file to create a database

Hi Guys, I have a list a hotels stored in many different text files. This list is kept in the following format: 20/03 Hotel: The Bear Hotel Honey Street Woodstock UK Tel:+44-xxxxxx Rate: 100 21/03 Hotel: The Bush Hotel Nice Street Farnham (4 Replies)
Discussion started by: freddie50
4 Replies
class_open(3)						     Library Functions Manual						     class_open(3)

NAME
class_open - Initialize the class scheduler database. SYNOPSIS
#include <apar_types.h> #include <sys/class.h> class_open( apart_id, part_id, *class_apar_handle_t, handle ); PARAMETERS
Input which describes the unique partition identifier. Output that displays the descriptor used in calls to reference the partition. DESCRIPTION
The class_open function is used to prepare the class scheduler database for use as follows: Opening the disk file (if any). Creating (or attaching to) a shared memory section. Creating (or attaching to) a semaphore. Initializing the database if one did not aready exist. Before class scheduling can be used for a partition, its class scheduler database must be initialized. At the first call of class_open() since the system last started, the function creates a shared memory segment for the partition database and, if it exists on disk, reads it into the shared memory. A semaphore is also created that is used to synchronize potential simultaneous database updates (from class_admin and runclass, for instance). If no database exists for the partition one will be created with the default configuration On subsequent calls to class_open() the function attaches to the existing shared memory and semaphore. RESTRICTIONS
The caller must have root access rights. RETURN VALUES
Operation successfully completed. The class_open succeeded but no database existed. A new database was created with default configuration settings. The calling process is not super user (root) and permission is denied. The malloc function failed to get memory for handle. Failed to access disk file, if it exists. Failed to create or attach to shared memory. Failed to create or attach to semaphore. SEE ALSO
class_scheduling(4), runclass(1), class_admin(8) delim off class_open(3)
All times are GMT -4. The time now is 05:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy