<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Connect to another database or user in JISQL"]]></title>
		<link>http://forums.hotjoe.com/posts/list/28.page</link>
		<description><![CDATA[Latest messages posted in the topic "Connect to another database or user in JISQL"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Connect to another database or user in JISQL</title>
				<description><![CDATA[ Hi,<br /> <br /> I am new to JISQL.<br /> Can anyone tell me how we can connect to another database or another user.<br /> For example we have done create user A;<br /> Now i want to change the user from current user to A. <br /> How shall I do it.<br /> <br /> In PSQL we do it like<br />  \connect ot \c [DBNAME [USERNAME]]]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/361/1523.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/361/1523.page</link>
				<pubDate><![CDATA[Mon, 23 Jul 2007 04:30:03]]> GMT</pubDate>
				<author><![CDATA[ shivanigoyal]]></author>
			</item>
			<item>
				<title>Re:Connect to another database or user in JISQL</title>
				<description><![CDATA[ There isn't anything like that in Jisql currently.  It would require disconnecting and reconnecting to the database.  But the real problem is changing databases.  That would require a different connection string.<br /> <br /> Each JDBC driver vendor puts the database name in slightly different places.  Off the top of my head I could change it so that the connection string has some sort of marker in it to include the database name and then add an option to specify the initial database.  The cstring argument would look something like:<br /> <br /> [code]jdbc:postgresql://localhost:5432/$DBNAME[/code]<br /> <br /> and if you indicated that you wanted to connect to a different database then $DBNAME would be updated and Jisql would reconnect<br /> <br /> Does that sound usable?  It's kind of a pain - it requires a non-standard connection string though it wouldn't be difficult to support the standard one also.<br /> <br /> Just a thought - let me know what you think about this change.]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/361/1524.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/361/1524.page</link>
				<pubDate><![CDATA[Mon, 23 Jul 2007 11:42:37]]> GMT</pubDate>
				<author><![CDATA[ stdunbar]]></author>
			</item>
			<item>
				<title>Re:Connect to another database or user in JISQL</title>
				<description><![CDATA[ Ok. My current requirement is only change of user to check Grant and Revoke.<br /> <br /> But when I tried to disconnect and reconnect by specifying the new user in connection string it shows an error.<br /> <br /> For example build is my Linux user.<br /> When i tried to connect to database using this user in connection string as :<br /> <br /> jdbc:postgresql://localhost:5432:test_db22 -user build -password password -c \;<br /> <br /> Then I am able to connect.<br /> But when I create a user through sql command as:<br /> <br /> Create user A;<br /> <br /> And then try to coonect through user A as:<br /> <br /> jdbc:postgresql://localhost:5432:test_db22 -user build -password password -c \;<br /> <br /> It shows an error : ERROR: database "A" does not exist ErrorCode: 0<br /> <br /> I want to connect to database though user created by database.<br /> <br /> Also while trying doing so, I found following things:<br /> <br /> 1) My user 'Build ' has a password, but i when I did not specify the password, it asked me for password with message: "hit enter for no password".<br /> I hit enter it then too it connected me to database.<br /> <br /> 2) Also if i specify the wrong database name, then it connect to any running database.<br /> <br /> example: jdbc:postgresql://localhost:5432:test_db22 -user build -password password -c \;<br /> <br /> After connection when i do:<br /> <br /> select current_database;<br /> it shows: shivani_db.<br /> <br /> While I connected to test_db22(which did not exists).<br /> <br /> <br /> Regards,<br /> Shivani<br />  <br /> <br /> ]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/361/1525.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/361/1525.page</link>
				<pubDate><![CDATA[Tue, 24 Jul 2007 00:02:29]]> GMT</pubDate>
				<author><![CDATA[ shivanigoyal]]></author>
			</item>
	</channel>
</rss>
