|
-
Feb 10th, 2012, 11:26 AM
#1
Thread Starter
Fanatic Member
Help Get info from MSSQL
hello i need help with this, how to edit in the database information with vb
I have MSSQL 2000, my database name is: MuOnline, table name MEMB_INFO , column: vip , account: memb___id
I had maked first Form1 like this for connection database:
Server: textbox1
User: textbox2
Password: textbox3
Database: textbox4
Button: Connect
If connection to database is enabled, to show msg and open Form2, where it is:
Account: textbox5
VIP: textbox6 (here displays the result of the database) / textbox7 (here is the text that will make new configs)
Button : save
If its saved succsessufully to display message that is saved.
I want just little program to edit 1 table, help please
-
Feb 11th, 2012, 05:58 PM
#2
Thread Starter
Fanatic Member
Re: Help Get info from MSSQL
any idea
i read about .SQLClient but there connect with windows autdition
-
Feb 11th, 2012, 09:13 PM
#3
Re: Help Get info from MSSQL
Try reading through out Database FAQ & Tutorial section It's got some good stuff in there including how to connect and retrieve data. Also, for help on the connectionstring, see http://www.connectionstrings.com
-tg
-
Feb 12th, 2012, 09:52 AM
#4
Thread Starter
Fanatic Member
Re: Help Get info from MSSQL
i manage to make it something but i want to make it custom to read the information from the textboxes and to connect to it:
here is my code, but not working
Code:
Imports System.Data.SqlClient
Public Class Form1
Private csx As New SqlConnection("Data Source=textbox1.text;Initial Catalog=textbox4.text;Integrated Security=True")
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub SqlConnection1_InfoMessage(ByVal sender As System.Object, ByVal e As System.Data.SqlClient.SqlInfoMessageEventArgs) Handles SqlConnection1.InfoMessage
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
csx.Open()
MsgBox("Work")
csx.Close()
End Sub
End Class
I got 4 textboxes
1 - server address:
2 - username:
3- password:
4 - Database:
When press the button to read the stuff and connect to it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|