[gnome-db] Error opening directory '/usr/lib/libgda/providers': Too many open files
- From: Fernando Alencar Maróstica <famarost unimep br>
- To: gnome-db-list gnome org
- Subject: [gnome-db] Error opening directory '/usr/lib/libgda/providers': Too many open files
- Date: 07 Jan 2003 12:56:45 -0200
Hello all!
I'm try execute simple sample of libgda use, but i receive this
errors:
fmarostica nitrogenium:/blackdolphin-1.0.0/src/libshark$ ./teste
** Message: libgda successfully initialized
** Message: ERROR: Error opening directory '/usr/lib/libgda/providers':
Too many open files
Error no: 0
description: Could not find provider PostgreSQL in the current setup
source: [GDA client]
sqlstate: (null)
My user limit is:
fmarostica nitrogenium:/blackdolphin-1.0.0/src/libshark$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 256
virtual memory (kbytes, -v) unlimited
How fix this errors ?
Have fun!
--
Fernando Alencar Maróstica
Graduate Student, Computer Science
Linux Register User Id #281457
University Methodist of Piracicaba
Departament of Computer Science
email: famarost unimep br
homepage: http://www.unimep.br/~famarost
#include <stdio.h>
#include <string.h>
#include <glib.h>
#include <libgda/libgda.h>
void
show_table (GdaDataModel * dm)
{
gint row_id;
gint column_id;
GdaValue *value;
gchar *string;
for (column_id = 0; column_id < gda_data_model_get_n_columns (dm); column_id++)
g_print("%s\t",gda_data_model_get_column_title (dm, column_id));
g_print("\n");
for (row_id = 0; row_id < gda_data_model_get_n_rows (dm); row_id++) {
for (column_id = 0; column_id < gda_data_model_get_n_columns (dm); column_id++) {
value = (GdaValue *) gda_data_model_get_value_at (dm, column_id, row_id);
string=gda_value_stringify (value);
g_print ("%s\t", string);
g_free(string);
}
g_print("\n");
}
}
void client_error_cb (GdaClient *client, GdaConnection *cnc, GList *errors, gpointer user_data)
{
GList *node;
GdaError *error;
for (node = g_list_first (errors); node != NULL; node = g_list_next (node)) {
error = (GdaError *) node->data;
g_print ("Error no: %ld\n", gda_error_get_number (error));
g_print ("description: %s\n", gda_error_get_description (error));
g_print ("source: %s\n", gda_error_get_source (error));
g_print ("sqlstate: %s\n\n", gda_error_get_sqlstate (error));
}
gda_error_list_free (node);
exit (1);
}
void
connect()
{
GdaClient *client;
GdaConnection *connection;
GdaDataModel *dm;
GdaCommand *command;
GList *list, *node;
client = gda_client_new();
g_signal_connect (client, "error", G_CALLBACK(client_error_cb), NULL);
connection = gda_client_open_connection (client, "blackdolphin", NULL, NULL);
command = gda_command_new ("SELECT * FROM tabela1", GDA_COMMAND_TYPE_SQL, GDA_COMMAND_OPTION_STOP_ON_ERRORS);
list = gda_connection_execute_command (connection, command, NULL);
if (list!=NULL)
for (node=g_list_first(list); node != NULL; node=g_list_next(node))
{
dm=(GdaDataModel *) node->data;
show_table (dm);
g_object_unref(dm);
}
gda_command_free (command);
gda_client_close_all_connections (client);
gda_main_quit ();
}
int main(int argc, char **argv)
{
gda_init ("blackdolphin", "1.0", argc, argv);
gda_config_save_data_source ("blackdolphin", "PostgreSQL", "DATABASE=teste", "Black Dolphin Test Database", NULL, NULL);
gda_main_run ((GdaInitFunc) connect, (gpointer) NULL);
exit (1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]