Click here to Skip to main content
15,891,473 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionserial no. in datagrid row header. Pin
abhinish1-Dec-05 1:31
abhinish1-Dec-05 1:31 
AnswerRe: serial no. in datagrid row header. Pin
lavanya_satheesh1-Dec-05 18:53
lavanya_satheesh1-Dec-05 18:53 
GeneralRe: serial no. in datagrid row header. Pin
abhinish1-Dec-05 20:50
abhinish1-Dec-05 20:50 
QuestionCan we send a datagrid's records directly to the database? Pin
lavanya_satheesh1-Dec-05 0:28
lavanya_satheesh1-Dec-05 0:28 
AnswerRe: Can we send a datagrid's records directly to the database? Pin
Pravin H8-Dec-05 1:58
Pravin H8-Dec-05 1:58 
GeneralRe: Can we send a datagrid's records directly to the database? Pin
lavanya_satheesh8-Dec-05 17:03
lavanya_satheesh8-Dec-05 17:03 
Questionhow to Bind 2 Tabels to one DataGrid ? Pin
microuser_20001-Dec-05 0:03
microuser_20001-Dec-05 0:03 
AnswerRe: how to Bind 2 Tabels to one DataGrid ? Pin
lavanya_satheesh1-Dec-05 19:27
lavanya_satheesh1-Dec-05 19:27 
i dont know if this will help u or not.
i dont know how to use the .FillSchema but the code i am posting worked fine for me.

Dim sqlcon As New SqlConnection(constr)
Dim sqladp As New SqlDataAdapter
Dim cmdstr As New SqlCommand
Dim dsdata As New DataSet
Dim strq As String
sqlcon.Open()
strq = "SELECT C.BillNo,C.BillDate,C.Customer,P.PID,P.PName FROM BillCommonDet AS C JOIN BillProductDet AS P ON (C.BillNo = P.BillNo)"
Try
sqladp.SelectCommand = cmdstr
sqladp.SelectCommand.CommandText = strq
sqladp.SelectCommand.Connection = sqlcon
dsdata.Clear()
sqladp.Fill(dsdata, "SearchResult")
If dsdata.Tables("SearchResult").Rows.Count > 0 Then
DataGrid1.DataSource = dsdata
DataGrid1.DataMember = "SearchResult"
DataGrid1.Refresh()
End If
cmdstr.Dispose()
sqlcon.Close()
sqlcon.Dispose()
sqladp.Dispose()
Catch empexp As SqlException
MessageBox.Show(empexp.Message)
End Try


hope this is of help to you.

Regards,

LavanyaBig Grin | :-D
QuestionSelect row in Datagrid Pin
bhavanamshah30-Nov-05 23:56
bhavanamshah30-Nov-05 23:56 
Questionnewbie in VB.NET Pin
Soniam30-Nov-05 23:19
Soniam30-Nov-05 23:19 
AnswerRe: newbie in VB.NET Pin
Joshua Quick1-Dec-05 11:34
Joshua Quick1-Dec-05 11:34 
AnswerRe: newbie in VB.NET Pin
dptalt2-Dec-05 2:20
dptalt2-Dec-05 2:20 
QuestionError while trying to run project Pin
alwinSCH30-Nov-05 21:21
alwinSCH30-Nov-05 21:21 
AnswerRe: Error while trying to run project Pin
Steve Pullan1-Dec-05 17:45
Steve Pullan1-Dec-05 17:45 
QuestionVB 6 Windows Services running in WinXP Environment Pin
miceisland30-Nov-05 15:57
miceisland30-Nov-05 15:57 
AnswerRe: VB 6 Windows Services running in WinXP Environment Pin
miceisland30-Nov-05 21:05
miceisland30-Nov-05 21:05 
AnswerRe: VB 6 Windows Services running in WinXP Environment Pin
Dave Kreskowiak1-Dec-05 6:13
mveDave Kreskowiak1-Dec-05 6:13 
GeneralRe: VB 6 Windows Services running in WinXP Environment Pin
miceisland1-Dec-05 22:18
miceisland1-Dec-05 22:18 
GeneralRe: VB 6 Windows Services running in WinXP Environment Pin
Dave Kreskowiak2-Dec-05 2:49
mveDave Kreskowiak2-Dec-05 2:49 
GeneralRe: VB 6 Windows Services running in WinXP Environment Pin
miceisland4-Dec-05 15:02
miceisland4-Dec-05 15:02 
QuestionUsing C++ virtual functions in DLL Pin
lkd_8530-Nov-05 12:31
lkd_8530-Nov-05 12:31 
AnswerRe: Using C++ virtual functions in DLL Pin
Christian Graus30-Nov-05 13:47
protectorChristian Graus30-Nov-05 13:47 
QuestionACCESS PROGRAMMING Pin
Jkkenzie30-Nov-05 4:35
Jkkenzie30-Nov-05 4:35 
AnswerRe: ACCESS PROGRAMMING Pin
KaptinKrunch30-Nov-05 6:50
KaptinKrunch30-Nov-05 6:50 
GeneralRe: ACCESS PROGRAMMING Pin
Jkkenzie1-Dec-05 6:53
Jkkenzie1-Dec-05 6:53 

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.