Click here to Skip to main content
15,890,512 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalcreate a shortecut in vb4 Pin
hjaycox15-Apr-05 8:29
hjaycox15-Apr-05 8:29 
GeneralRe: create a shortecut in vb4 Pin
Dave Kreskowiak15-Apr-05 14:25
mveDave Kreskowiak15-Apr-05 14:25 
GeneralRe: create a shortecut in vb4 Pin
Anonymous16-Apr-05 11:23
Anonymous16-Apr-05 11:23 
Questiondatagrid with checkbox ?????? Pin
sumit2115-Apr-05 7:31
sumit2115-Apr-05 7:31 
Questioncan i retrieve the primary keys of a table? Pin
sumit2115-Apr-05 7:28
sumit2115-Apr-05 7:28 
AnswerRe: can i retrieve the primary keys of a table? Pin
Nicholas Cardi15-Apr-05 12:57
Nicholas Cardi15-Apr-05 12:57 
GeneralRe: can i retrieve the primary keys of a table? Pin
sumit2116-Apr-05 0:31
sumit2116-Apr-05 0:31 
GeneralRe: can i retrieve the primary keys of a table? Pin
Nicholas Cardi16-Apr-05 2:05
Nicholas Cardi16-Apr-05 2:05 
I was not sure if you were using OLEDB or ODBC so I did it in OLEDB.

Private Sub cmdFindPrimary_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdFindPrimary.Click
Try
Dim ConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=V:\VBScratchPad\test.mdb;"
Dim cn As OleDbConnection = New OleDbConnection(ConnString)

cn.Open()

Dim da As New OleDbDataAdapter("Select * from Test", cn)

Dim ds As New DataSet("TESTING")
da.FillSchema(ds, SchemaType.Mapped)

For i As Integer = 0 To ds.Tables(0).PrimaryKey.GetUpperBound(0)
Console.WriteLine(ds.Tables(0).PrimaryKey(i).ColumnName)
Next
Catch ex As ApplicationException
MessageBox.Show(ex.ToString())
End Try

End Sub

Best of Luck

Forever Developing
GeneralRe: can i retrieve the primary keys of a table? Pin
sumit2116-Apr-05 3:49
sumit2116-Apr-05 3:49 
GeneralRe: can i retrieve the primary keys of a table? Pin
Nicholas Cardi16-Apr-05 5:07
Nicholas Cardi16-Apr-05 5:07 
GeneralRe: can i retrieve the primary keys of a table? Pin
sumit2116-Apr-05 17:16
sumit2116-Apr-05 17:16 
GeneralRead a MP3 Bite rate Pin
FastFriedMonkey15-Apr-05 6:07
FastFriedMonkey15-Apr-05 6:07 
GeneralRe: Read a MP3 Bite rate Pin
Anonymous16-Apr-05 11:37
Anonymous16-Apr-05 11:37 
GeneralDirectDraw in VB 6.0 Pin
timothyl15-Apr-05 6:03
timothyl15-Apr-05 6:03 
GeneralDynamically loaded controls Pin
Member 188578015-Apr-05 4:19
Member 188578015-Apr-05 4:19 
Generalrecording sound over .net Pin
goalzeze15-Apr-05 4:17
goalzeze15-Apr-05 4:17 
Generalshifting focus from datagrids Pin
Paps215-Apr-05 3:29
Paps215-Apr-05 3:29 
GeneralRe: shifting focus from datagrids Pin
Anonymous15-Apr-05 22:24
Anonymous15-Apr-05 22:24 
Questionhow to reload dataReader? Pin
Lisana15-Apr-05 2:25
Lisana15-Apr-05 2:25 
AnswerRe: how to reload dataReader? Pin
Dave Kreskowiak15-Apr-05 3:54
mveDave Kreskowiak15-Apr-05 3:54 
GeneralRe: how to reload dataReader? Pin
Lisana15-Apr-05 3:58
Lisana15-Apr-05 3:58 
GeneralRe: how to reload dataReader? Pin
Dave Kreskowiak15-Apr-05 4:20
mveDave Kreskowiak15-Apr-05 4:20 
GeneralRe: how to reload dataReader? Pin
Lisana15-Apr-05 4:30
Lisana15-Apr-05 4:30 
GeneralRe: how to reload dataReader? Pin
Dave Kreskowiak15-Apr-05 7:26
mveDave Kreskowiak15-Apr-05 7:26 
GeneralRe: how to reload dataReader? Pin
Lisana15-Apr-05 8:06
Lisana15-Apr-05 8:06 

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.