hi everyone..

can anyone help me please..
i have a datagridview with 4 columns (id, name, ticket_number, destination), i just want that datagridview on column "ticket_number" to display ticket_number from mysql database and another 3 columns for user input.

thanks in advance..

Ok i think you need this query

Dim CmdStr As String = "Select ticket_number from TableName where id="+Me.TextBox1.Text+" and name='"+Me.TextBox2.Text+"' and destination='"+Me.TextBox3.Text+"'"

Assuming
id, Numeric
name, Varchar
ticket_number, Varchar
destination, Varchar

And

TextBox1 for id input
TextBox2 for name input
TextBox3 for destination input

Hope this will help u...

Ok i think you need this query

Dim CmdStr As String = "Select ticket_number from TableName where id="+Me.TextBox1.Text+" and name='"+Me.TextBox2.Text+"' and destination='"+Me.TextBox3.Text+"'"

Assuming
id, Numeric
name, Varchar
ticket_number, Varchar
destination, Varchar

And

TextBox1 for id input
TextBox2 for name input
TextBox3 for destination input

Hope this will help u...

no.. you don't get it dude, i didn't use textbox at all, my point is, i allow user to insert something on column id, column name and column destination in datagridview then PICK something in column ticket_number, where ticket_number column get data from database still in same datagridview (ticket_number column not allow for input), maybe it likes i have to access datagridview spesific column(ticket_number) to reference it to database, but the question is, how to do that?

hi everyone..

can anyone help me please..
i have a datagridview with 4 columns (id, name, ticket_number, destination), i just want that datagridview on column "ticket_number" to display ticket_number from mysql database and another 3 columns for user input.

thanks in advance..

after searching so long.. i didn't find what i want.. please anyone give me some idea :(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.