LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-14-2013, 07:22 PM   #1
mtdew3q
Member
 
Registered: Mar 2006
Location: the next town over from siberia
Distribution: xubuntu
Posts: 481

Rep: Reputation: 18
tcl postgres error


Hi-

I am getting a msg. stating fatal error: pgsql8 not a valid connnection . I have 9.1 on my system. The last db I used worked fine. I am wondering if I set up the db wrong. If I do a select from psql it works fine.

please assist!
thanks

Code:
    proc ::connectToDB {} {
    global db
	
    lappend auto_path .
    set auto_path [linsert $auto_path 0 /usr/lib/libpgtcl1.5]
#   set auto_path [linsert $auto_path 0 /usr/lib/libpgtcl1.5]
    package require Pgtcl 
    set db [pg_connect -conninfo[list host = localhost user =              postgres       dbname = taskdb]]
    set rs [pg_exec $db "select id from task"]
    set status [pg_result $rs -status]
    tk_messageBox -message "status :$status" 
    pg_disconnect $db
}
 
Old 05-14-2013, 08:19 PM   #2
mtdew3q
Member
 
Registered: Mar 2006
Location: the next town over from siberia
Distribution: xubuntu
Posts: 481

Original Poster
Rep: Reputation: 18
hi-

It was a careless mistake. I fixed it. Sorry.
thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Little error (not harmful) exists in tcl.SlackBuild (source slackbuilds for Tcl) blancamolinos Slackware 3 01-14-2013 05:46 AM
postgres install error 0rajneesh Linux - Software 1 03-16-2011 02:16 AM
Postgres Install Error crash_override_me Linux - Software 1 07-17-2008 01:26 PM
Postgres pg admin error nkutty Linux - Server 1 07-14-2008 03:15 PM
postgres client connection error sailu_mvn Linux - Networking 5 06-21-2007 06:10 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration