Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Power Lifting Lever Belt
SkullVamp
Updated:
Saturday at 10:32 PM
Ad icon
port.lk Domain for sale
Lankan-Tech
Updated:
Saturday at 3:55 PM
Colombo
Kaduwela - Two Storey House for Sale
dilrasan
Updated:
Thursday at 2:23 PM
Ad icon
Wechat qr verification
Pawan2005
Updated:
Thursday at 1:28 AM
🚀 GOOGLE AI PRO 18 MONTHS ACTIVATION 🚀
sayuru bandara
Updated:
Wednesday at 5:34 PM
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
Java danna aya HELP ekak!!
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="v7soft" data-source="post: 11882917" data-attributes="member: 121104"><p>google karapna ban karapan ona tharam ex tiyanwa .</p><p>[CODE]</p><p>[COLOR=#7f0055][B]import [/B][/COLOR][COLOR=#000000]java.sql.Connection;[/COLOR]</p><p>[COLOR=#7f0055][B]import [/B][/COLOR][COLOR=#000000]java.sql.DriverManager;[/COLOR]</p><p>[COLOR=#7f0055][B]import [/B][/COLOR][COLOR=#000000]java.sql.ResultSet;[/COLOR]</p><p>[COLOR=#7f0055][B]import [/B][/COLOR][COLOR=#000000]java.sql.ResultSetMetaData;[/COLOR]</p><p>[COLOR=#7f0055][B]import [/B][/COLOR][COLOR=#000000]java.sql.Statement;[/COLOR]</p><p>[COLOR=#ffffff][/COLOR]</p><p>[COLOR=#7f0055][B]public class [/B][/COLOR][COLOR=#000000]Main [/COLOR][COLOR=#000000]{[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#7f0055][B]public static [/B][/COLOR][COLOR=#7f0055][B]void [/B][/COLOR][COLOR=#000000]main[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]String[/COLOR][COLOR=#000000][] [/COLOR][COLOR=#000000]args[/COLOR][COLOR=#000000]) [/COLOR][COLOR=#7f0055][B]throws [/B][/COLOR][COLOR=#000000]Exception [/COLOR][COLOR=#000000]{[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]Connection conn = getConnection[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]Statement st = conn.createStatement[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#3f7f5f]// st.executeUpdate("drop table survey;");[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]st.executeUpdate[/COLOR][COLOR=#000000]([/COLOR][COLOR=#2a00ff]"create table survey (id int,name varchar(30));"[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]st.executeUpdate[/COLOR][COLOR=#000000]([/COLOR][COLOR=#2a00ff]"insert into survey (id,name ) values (1,'nameValue')"[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]st = conn.createStatement[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]ResultSet rs = st.executeQuery[/COLOR][COLOR=#000000]([/COLOR][COLOR=#2a00ff]"SELECT * FROM survey"[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]ResultSetMetaData rsMetaData = rs.getMetaData[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#7f0055][B]int [/B][/COLOR][COLOR=#000000]numberOfColumns = rsMetaData.getColumnCount[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]System.out.println[/COLOR][COLOR=#000000]([/COLOR][COLOR=#2a00ff]"resultSet MetaData column Count=" [/COLOR][COLOR=#000000]+ numberOfColumns[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]st.close[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]conn.close[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]}[/COLOR]</p><p>[COLOR=#ffffff][/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#7f0055][B]private static [/B][/COLOR][COLOR=#000000]Connection getConnection[/COLOR][COLOR=#000000]() [/COLOR][COLOR=#7f0055][B]throws [/B][/COLOR][COLOR=#000000]Exception [/COLOR][COLOR=#000000]{[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]String driver = [/COLOR][COLOR=#2a00ff]"sun.jdbc.odbc.JdbcOdbcDriver"[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]String url = [/COLOR][COLOR=#2a00ff]"jdbc:odbc:northwind"[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]String username = [/COLOR][COLOR=#2a00ff]""[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]String password = [/COLOR][COLOR=#2a00ff]""[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#7f0055][B]Class[/B][/COLOR][COLOR=#000000].forName[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]driver[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#7f0055][B]return [/B][/COLOR][COLOR=#000000]DriverManager.getConnection[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]url, username, password[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]</p><p>[COLOR=#ffffff][/COLOR][COLOR=#000000]}[/COLOR]</p><p>[COLOR=#000000]}[/COLOR]</p><p>[/CODE]</p><p>mulin DSN akak hadala hitpan me balapan <a href="http://support.microsoft.com/kb/305599" target="_blank">http://support.microsoft.com/kb/305599</a></p></blockquote><p></p>
[QUOTE="v7soft, post: 11882917, member: 121104"] google karapna ban karapan ona tharam ex tiyanwa . [CODE] [COLOR=#7f0055][B]import [/B][/COLOR][COLOR=#000000]java.sql.Connection;[/COLOR] [COLOR=#7f0055][B]import [/B][/COLOR][COLOR=#000000]java.sql.DriverManager;[/COLOR] [COLOR=#7f0055][B]import [/B][/COLOR][COLOR=#000000]java.sql.ResultSet;[/COLOR] [COLOR=#7f0055][B]import [/B][/COLOR][COLOR=#000000]java.sql.ResultSetMetaData;[/COLOR] [COLOR=#7f0055][B]import [/B][/COLOR][COLOR=#000000]java.sql.Statement;[/COLOR] [COLOR=#ffffff][/COLOR] [COLOR=#7f0055][B]public class [/B][/COLOR][COLOR=#000000]Main [/COLOR][COLOR=#000000]{[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#7f0055][B]public static [/B][/COLOR][COLOR=#7f0055][B]void [/B][/COLOR][COLOR=#000000]main[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]String[/COLOR][COLOR=#000000][] [/COLOR][COLOR=#000000]args[/COLOR][COLOR=#000000]) [/COLOR][COLOR=#7f0055][B]throws [/B][/COLOR][COLOR=#000000]Exception [/COLOR][COLOR=#000000]{[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]Connection conn = getConnection[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]Statement st = conn.createStatement[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#3f7f5f]// st.executeUpdate("drop table survey;");[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]st.executeUpdate[/COLOR][COLOR=#000000]([/COLOR][COLOR=#2a00ff]"create table survey (id int,name varchar(30));"[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]st.executeUpdate[/COLOR][COLOR=#000000]([/COLOR][COLOR=#2a00ff]"insert into survey (id,name ) values (1,'nameValue')"[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]st = conn.createStatement[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]ResultSet rs = st.executeQuery[/COLOR][COLOR=#000000]([/COLOR][COLOR=#2a00ff]"SELECT * FROM survey"[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]ResultSetMetaData rsMetaData = rs.getMetaData[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#7f0055][B]int [/B][/COLOR][COLOR=#000000]numberOfColumns = rsMetaData.getColumnCount[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]System.out.println[/COLOR][COLOR=#000000]([/COLOR][COLOR=#2a00ff]"resultSet MetaData column Count=" [/COLOR][COLOR=#000000]+ numberOfColumns[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]st.close[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]conn.close[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]}[/COLOR] [COLOR=#ffffff][/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#7f0055][B]private static [/B][/COLOR][COLOR=#000000]Connection getConnection[/COLOR][COLOR=#000000]() [/COLOR][COLOR=#7f0055][B]throws [/B][/COLOR][COLOR=#000000]Exception [/COLOR][COLOR=#000000]{[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]String driver = [/COLOR][COLOR=#2a00ff]"sun.jdbc.odbc.JdbcOdbcDriver"[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]String url = [/COLOR][COLOR=#2a00ff]"jdbc:odbc:northwind"[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]String username = [/COLOR][COLOR=#2a00ff]""[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]String password = [/COLOR][COLOR=#2a00ff]""[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#7f0055][B]Class[/B][/COLOR][COLOR=#000000].forName[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]driver[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#7f0055][B]return [/B][/COLOR][COLOR=#000000]DriverManager.getConnection[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]url, username, password[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR] [COLOR=#ffffff][/COLOR][COLOR=#000000]}[/COLOR] [COLOR=#000000]}[/COLOR] [/CODE] mulin DSN akak hadala hitpan me balapan [URL]http://support.microsoft.com/kb/305599[/URL] [/QUOTE]
Insert quotes…
Verification
Awruddata maasa keeyada?
Post reply
Top
Bottom