Click here to Skip to main content
16,014,671 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
JokeRe: Progress Bar Pin
T M Gray13-Jul-10 10:13
T M Gray13-Jul-10 10:13 
GeneralRe: Progress Bar Pin
Abhinav S13-Jul-10 18:56
Abhinav S13-Jul-10 18:56 
QuestionDll which complied in vista takes too much time Pin
rsumanan13-Jul-10 1:08
rsumanan13-Jul-10 1:08 
Answer[Repost] Re: Dll which complied in vista takes too much time Pin
Peace ON13-Jul-10 1:13
Peace ON13-Jul-10 1:13 
Question.exe update Pin
padmanabhan N12-Jul-10 21:57
padmanabhan N12-Jul-10 21:57 
Answer[Repost] Re: .exe update Pin
Peace ON12-Jul-10 22:23
Peace ON12-Jul-10 22:23 
AnswerCross post Pin
Pete O'Hanlon12-Jul-10 22:24
mvePete O'Hanlon12-Jul-10 22:24 
QuestionRecords do not show Pin
akosidandan12-Jul-10 20:46
akosidandan12-Jul-10 20:46 
Hello,

I would like to ask why do I cannot display my records in my datagriview,
the database I use is sql server 2005 with ".mdf" extension. Also
if I use the wizard to add datasource I can add,delete records but when I run change
the startup form to show the records via code connection the records I think is gone or something
in my code is really wrong Confused | :confused:


The code I use is here:

Imports System.Data.SqlClient
Public Class Form2

    Dim con As New SqlConnection

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            con.ConnectionString = "Data Source=.\SQLEXPRESS;" + _
                                    "AttachDbFilename=|DataDirectory|\Database1.mdf;" + _
                                    "Integrated Security=True;User Instance=True"
            con.Open()
            con.Close()

            Dim da As New SqlDataAdapter
            Dim dt As New DataTable
            Dim ds As New DataSet

            ds.Tables.Add(dt)
            con.Open()
            da = New SqlDataAdapter("SELECT * FROM phoneBookTable", con)
            da.Fill(dt)
            con.Close()

            DataGridView1.DataSource = dt.DefaultView

        Catch ex As Exception
            MsgBox(ex.ToString)
            con.Close()
        End Try
    End Sub
End Class


Thanks,
Dan
AnswerRe: Records do not show Pin
Peace ON12-Jul-10 22:46
Peace ON12-Jul-10 22:46 
GeneralRe: Records do not show Pin
akosidandan12-Jul-10 23:19
akosidandan12-Jul-10 23:19 
AnswerRe: Records do not show Pin
Peace ON12-Jul-10 23:26
Peace ON12-Jul-10 23:26 
GeneralRe: Records do not show Pin
akosidandan12-Jul-10 23:42
akosidandan12-Jul-10 23:42 
AnswerRe: Records do not show Pin
Peace ON16-Jul-10 3:02
Peace ON16-Jul-10 3:02 
GeneralRe: Records do not show Pin
akosidandan16-Jul-10 3:07
akosidandan16-Jul-10 3:07 
GeneralRe: Records do not show Pin
Peace ON16-Jul-10 3:11
Peace ON16-Jul-10 3:11 
GeneralRe: Records do not show Pin
akosidandan16-Jul-10 3:14
akosidandan16-Jul-10 3:14 
GeneralRe: Records do not show Pin
Peace ON16-Jul-10 3:16
Peace ON16-Jul-10 3:16 
QuestionMultiple web site hosting in IIS having multiple domain names with static ip Pin
Vinay Varghese11-Jul-10 0:05
Vinay Varghese11-Jul-10 0:05 
AnswerRe: Multiple web site hosting in IIS having multiple domain names with static ip Pin
T M Gray13-Jul-10 8:43
T M Gray13-Jul-10 8:43 
GeneralRe: Multiple web site hosting in IIS having multiple domain names with static ip Pin
Vinay Varghese13-Jul-10 12:36
Vinay Varghese13-Jul-10 12:36 
GeneralRe: Multiple web site hosting in IIS having multiple domain names with static ip Pin
T M Gray14-Jul-10 9:37
T M Gray14-Jul-10 9:37 
GeneralRe: Multiple web site hosting in IIS having multiple domain names with static ip Pin
Vinay Varghese21-Jul-10 19:24
Vinay Varghese21-Jul-10 19:24 
Questionproblem in implementing validations in dynamically generated textboxes in Desktop vb.net application Pin
Amit Spadez9-Jul-10 2:04
professionalAmit Spadez9-Jul-10 2:04 
AnswerRe: problem in implementing validations in dynamically generated textboxes in Desktop vb.net application Pin
Eddy Vluggen10-Jul-10 23:55
professionalEddy Vluggen10-Jul-10 23:55 
QuestionCreating Triggers Using Managed Code in SQL Server 2005 Pin
brian0048-Jul-10 23:11
brian0048-Jul-10 23:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.