sager 0 Report post Posted August 19, 2009 Assalamm....saya ndak bukak table baru dlm database menggunakan VB.NET dan ODBC.tetapi buat masa ni code dia x work.So, sy mintak panduan dan nasihat drpd user yg berpengalaman semua utk menambah baik code saya ini.Saya tertannya kenapa x nampak table baru dalam database postgresql?Imports SystemImports System.DataImports System.Data.OdbcPublic Class Form1Dim thisConnection As New OdbcConnection _("dsn=MyOdbc")Dim nonqueryCommand As OdbcCommand = thisConnection.CreateCommand()Public sConnection As String = "DSN=PostgreSQL30;UID=tele;PWD=tiny;"Public cnDB As New Odbc.OdbcConnection(sConnection)Public dsDB As New DataSetPublic adDB As New Odbc.OdbcDataAdapterPrivate Sub Button1_Click(ByVal sender As System.Object, _ByVal e As System.EventArgs) _Handles Button1.ClicknonqueryCommand.CommandText = "CREATE TABLE mytable " & _"(MyName VARCHAR (30), MyNumber INTEGER)"'Console.WriteLine("Executing {0}", _' nonqueryCommand.CommandText)'Console.WriteLine("Number of rows affected : {0}", _' nonqueryCommand.ExecuteNonQuery())TrycnDB.Open()'adDB.SelectCommand = New Odbc.OdbcCommand(" CREATE TABLE sensor_result_test ")MsgBox("Connect to Database", MsgBoxStyle.Information, "Success")cnDB.Close()Catch ex As ExceptionMsgBox("Connection to database Failed", MsgBoxStyle.Critical, "Action Failed")End TryEnd SubEnd Classfail dia.http://rapidshare.com/files/268975860/BuiltNewtables1.rar.htmlsekian terima kasih. Quote Share this post Link to post Share on other sites
DevGuy_1 0 Report post Posted August 20, 2009 oo. okapasal guna odbc.odbc ni kira dah 2nd layer dahcuba guna .net provider utk postgresql. cuba masuk sini and dload http://npgsql.projects.postgresql.org/ok saya dah tgk and tgh ubah sikittapi saya guna .net data provider.kasi email nanti aku send balik kat ko.ok Quote Share this post Link to post Share on other sites
sager 0 Report post Posted August 20, 2009 ezalampunk at gmail.com.tq. abang.sy ada try gak npgsql tp xjd.huhu.... Quote Share this post Link to post Share on other sites
DevGuy_1 0 Report post Posted August 20, 2009 ok aku dah send dah cuba ko try tgk and runok adiosaaa Quote Share this post Link to post Share on other sites
DevGuy_1 0 Report post Posted August 20, 2009 tipu aaa email tak leh pun reject apadaaabetul ker email ni [email protected] Quote Share this post Link to post Share on other sites
sager 0 Report post Posted August 24, 2009 [email protected] betul beb.atau antar je kat eza17 at yahoo.com.tq. Quote Share this post Link to post Share on other sites
sager 0 Report post Posted August 24, 2009 x reti ndak guna npgsql nih.sy ndak guna dlm vb.net jer.minta tunjuk ajar... thanks Quote Share this post Link to post Share on other sites
DevGuy_1 0 Report post Posted August 24, 2009 aku dah buatkan dahhemail mana satu niiko nyerr asyik bound back jerrr Quote Share this post Link to post Share on other sites
DevGuy_1 0 Report post Posted August 24, 2009 lg satu apasal la ko guna postgreesqlguna sql server sudahh express edition jerrr Quote Share this post Link to post Share on other sites
sager 0 Report post Posted August 25, 2009 mana2 email pun boleh incik.hmmm.... antar aja ke eza17 at yahoo.com.Erk, saya ndak try postgresql aja incik. Quote Share this post Link to post Share on other sites