Posts

Showing posts with the label SQL

[RESOLVED] Call to undefined function pg_query (), Wamp Server PostgreSQL

[RESOLVED] Call to undefined function pg_query (), Wamp Server PostgreSQL [RESOLVED] Call to undefined function pg_query (), Wamp Server PostgreSQL to install our beloved localhost test server, and try to start connecting with the great aand PHP DB Manager PostgrSQL we noticed a very common mistake that would be   Call to undefined function pg_query () which is solved by doing the following:  1 ..- activate our php.ini extensions that brings WampServer, and extensions that we have are:    php_pgsql.dll   ,  php_pdo_pgsql.dll    these extensions are enabled clearing to the point semicolon (;) is in front of the name (Example:;  php_pdo_pgsql.dll remove it; there are forward and becomes:     php_pdo_pgsql.dll  ), save changes in php.ini.  2. NEXT go to the route:          C: \ wamp \ bin \ php \ php5.4.3 We place the library call:    libpq.dll    t...

Performing Inner Join for Multiple Columns in the Same Table

Performing Inner Join for Multiple Columns in the Same Table tbColors color_code , color_name 1 , 'blue' 2 , 'green' 3 , 'yellow' 4 , 'red' tbAnswers answer_id , favorite_color , least_favorite_color , color_im_allergic_to 1 , 1 , 2 3 2 , 3 , 1 4 3 , 1 , 1 2 4 , 2 , 3 4 This seems like the way to go: SELECT A . answer_id , C1 . color_name AS favorite_color_name , C2 . color_name AS least_favorite_color_name , C3 . color_name AS color_im_allergic_to_name FROM tbAnswers AS A INNER JOIN tbColors AS C1 ON A . favorite_color = C1 . color_code INNER JOIN tbColors AS C2 ON A . least_favorite_color =...

Steps to connect to Sql server on Windows Azure Virtual Machine from local machine

Here are the detailed steps to connection Sql instance in a Windows Azure Virtual Machine, from your local machine, through SQL Server Management Studio. Assume you have already had Sql Server installed on the VM, and SSMS installed on your local machine. 1, Configure your virtual machine’s firewall to allow connection to port 1433 a)      Go to windows firewall, launch Advanced Settings; b)      Select Inbound rules on the left, and click “New Rule…” on the right; c)       Select Port in New Inbound Rule Wizard, click Next; d)      Make sure TCP is selected, and put 1433 in Specific local ports text box, click Next; e)      Select Allow the connection, click Next; f)       Select Domain, Private and Public, click Next; g)      Put whatever name in the Name field, click Finish; 2, Cr...

how to display data from sql database to textbox using C#.net

Image
how to display data from sql database to textbox using C#.net 9 solutions Solution 1 You can use this :  Collapse  |  Copy Code SqlConnection Conn = new SqlConnection(Connection_String); SqlCommand Comm1 = new SqlCommand(Command, Conn); Conn.Open(); SqlDataReader DR1 = Comm1.ExecuteReader(); if (DR1.Read()) { textBox.Text = DR1.GetValue( 0 ).ToString(); } Conn.Close(); another way :  Collapse  |  Copy Code SqlConnection Conn = new SqlConnection(Connection_String); SqlCommand Comm1 = new SqlCommand(Command, Conn); Conn.Open(); textBox.Text = Comm1.ExecuteScalar(); Conn.Close(); Comments Hello sir, I was using my way,but i made a slight change according to you,even though it is not retriving. I created in windows application,one form in that i had created three labels (first,middle,last) & infront of that i created textboxes with Search button in bottom .And now i create...