กระดานแสดงความคิดเห็น
Home
Contents
Articles
Quiz
Members
Sponsor
Print-friendly
MENU
ปรับปรุง : 2566-10-15 (กระดานแสดงความคิดเห็น)
เว็บเพจหน้านี้สำหรับผู้ดูแลเท่านั้น
รหัส secure
=>
นำตัวอักษร สีขาวบนพื้นแดง มาป้อนในช่องนี้
edit_topic_password =>
<center><table width=90% border=0 bgcolor=#000080><tr><td><font color=white size=4>ตัวอย่าง code ที่เรียน .net กับ อ.ธนัท ผุดกระจ่าง สำหรับเชื่อมต่อฐานข้อมูลแบบพิมพ์ code</td></tr></table><table width=90% bordercolor=#000080 border=1><tr><td bgcolor=white><br>ตัวอย่าง code ที่เรียน .net กับ อ.ธนัท ผุดกระจ่าง<br /> สำหรับเชื่อมต่อฐานข้อมูลแบบพิมพ์ code<br /> Option Strict On<br /> Option Explicit On<br /> Imports System<br /> Imports System.Data.SqlClient<br /> Imports Microsoft.VisualBasic<br /> <br /> Module Module1<br /> Public Function fncconnectiondb() As SqlConnection<br /> Dim mycon As String<br /> Dim mycondb As New SqlConnection<br /> Try<br /> mycon = "Data Source=lab322\SQLExpress;Initial Catalog=Northwind;Integrated Security=True"<br /> mycondb.ConnectionString = mycon<br /> If mycondb.State = ConnectionState.Closed Then<br /> mycondb.Open()<br /> End If<br /> Catch ex As Exception<br /> 'MessageBox.Show(ex.ToString)<br /> MsgBox(ex.ToString)<br /> End Try<br /> Return mycondb<br /> End Function<br /> End Module<br /> <br><br></td></tr><tr><td align=right bgcolor=black><font color=white><small><b>จากคุณ :</b> บุรินทร์ <a href=mailto:></a><a title='202.29.78.18'>.</a><br> 03:24am (10/07/06)</font></td></tr></table></center>