Results 1 to 4 of 4

Thread: Help Get info from MSSQL

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2009
    Posts
    524

    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

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2009
    Posts
    524

    Re: Help Get info from MSSQL

    any idea
    i read about .SQLClient but there connect with windows autdition

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2009
    Posts
    524

    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
  •  



Click Here to Expand Forum to Full Width