Click here to Skip to main content
16,007,885 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to access network web cam using .net code Pin
irshad.don2-Dec-08 22:17
irshad.don2-Dec-08 22:17 
GeneralRe: How to access network web cam using .net code Pin
Dave Kreskowiak3-Dec-08 4:02
mveDave Kreskowiak3-Dec-08 4:02 
Questioninsert data into DataGrid from Oracle database using Vb 6.0] Pin
sumit52832-Dec-08 19:53
sumit52832-Dec-08 19:53 
AnswerRe: insert data from Oracle database using DataGrid Pin
Vimalsoft(Pty) Ltd2-Dec-08 20:08
professionalVimalsoft(Pty) Ltd2-Dec-08 20:08 
GeneralRe: insert data from Oracle database using DataGrid Pin
sumit52832-Dec-08 20:21
sumit52832-Dec-08 20:21 
GeneralRe: insert data from Oracle database using DataGrid Pin
Vimalsoft(Pty) Ltd2-Dec-08 22:51
professionalVimalsoft(Pty) Ltd2-Dec-08 22:51 
AnswerRe: insert data into DataGrid from Oracle database using Vb 6.0] Pin
Nanda_MR2-Dec-08 21:56
Nanda_MR2-Dec-08 21:56 
GeneralRe: insert data into DataGrid from Oracle database using Vb 6.0] Pin
sumit52832-Dec-08 23:03
sumit52832-Dec-08 23:03 
This ismy code:

Dim CN As ADODB.Connection
Dim CP As ADODB.Command
Dim RS As ADODB.Recordset
Dim QSQL As String
Dim c As Integer
Dim r As Integer
Dim col_wid() As Single
Dim field_wid As Single
Dim lngWidth As Long
Dim DB As Long
'Connect to Oracele server begin
Set CN = New ADODB.Connection
With CN
.Provider = "OraOLEDB.Oracle"
.Properties("Data Source") = "CARE.TPSL"
.Properties("User Id") = "TESTDATABASE"
.Properties("Password") = "testdatabase"
.Open
End With
' select the data
QSQL = "select emp_id,emp_name,gender,dob,age,doj,city from emp"

' Get the records
Set RS = CN.Execute(QSQL, , adCmdText)

With DGrid1

.AllowAddNew = False
.AllowDelete = True
.AllowRowSizing = False
.AllowUpdate = True
.ColumnHeaders = True
.MarqueeStyle = dbgHighlightCell
.RecordSelectors = True
.RowHeight = 250
.ScrollBars = dbgBoth


DGrid1.Col = RS.Fields.Count
ReDim col_wid(0 To RS.Fields.Count - 1)
For DB = 0 To RS.Fields.Count - 1
DGrid1.DataBindings(DB) = RS.Fields(c).name
col_wid(DB) = TextWidth(RS.Fields(c).name)
Next DB
DB = 1
Do While Not RS.EOF
DGrid1.Row = DGrid1.Row + 1
For DB = 0 To RS.Fields.Count - 1
DGrid1.DataBindings(DB) = RS.Fields(DB).Value
Next DB
RS.MoveNext
r = r + 1
Loop
End With
'close the connection
CN.Close
Set CN = Nothing

// Now when I run the code it gives an Runtime error:6145 Invalid Column Index in the line (DGrid1.Col = RS.Fields.Count). So Please guide me to solve the problem.
GeneralRe: insert data into DataGrid from Oracle database using Vb 6.0] Pin
Wendelius3-Dec-08 10:44
mentorWendelius3-Dec-08 10:44 
GeneralRe: insert data into DataGrid from Oracle database using Vb 6.0] Pin
Nanda_MR3-Dec-08 21:56
Nanda_MR3-Dec-08 21:56 
AnswerRe: insert data into DataGrid from Oracle database using Vb 6.0] [modified] Pin
Vimalsoft(Pty) Ltd2-Dec-08 23:13
professionalVimalsoft(Pty) Ltd2-Dec-08 23:13 
GeneralRe: insert data into DataGrid from Oracle database using Vb 6.0] Pin
ChandraRam3-Dec-08 22:48
ChandraRam3-Dec-08 22:48 
GeneralRe: insert data into DataGrid from Oracle database using Vb 6.0] Pin
sumit52834-Dec-08 0:28
sumit52834-Dec-08 0:28 
GeneralRe: insert data into DataGrid from Oracle database using Vb 6.0] Pin
sumit52837-Dec-08 23:47
sumit52837-Dec-08 23:47 
GeneralRe: insert data into DataGrid from Oracle database using Vb 6.0] Pin
ChandraRam7-Dec-08 23:53
ChandraRam7-Dec-08 23:53 
GeneralRe: insert data into DataGrid from Oracle database using Vb 6.0] Pin
sumit52838-Dec-08 0:33
sumit52838-Dec-08 0:33 
Questionhow to get DataGridViewComboBoxColumn selected value in vb.net2005, Pin
Ageesh2-Dec-08 19:18
Ageesh2-Dec-08 19:18 
GeneralRe: how to get DataGridViewComboBoxColumn selected value in vb.net2005, Pin
Nanda_MR2-Dec-08 21:58
Nanda_MR2-Dec-08 21:58 
QuestionUSB information & use? Pin
bac5122-Dec-08 17:37
bac5122-Dec-08 17:37 
AnswerRe: USB information & use? Pin
Christian Graus2-Dec-08 18:18
protectorChristian Graus2-Dec-08 18:18 
GeneralRe: USB information & use? Pin
Luc Pattyn2-Dec-08 21:55
sitebuilderLuc Pattyn2-Dec-08 21:55 
GeneralRe: USB information & use? Pin
bac5123-Dec-08 7:11
bac5123-Dec-08 7:11 
GeneralRe: USB information & use? Pin
Luc Pattyn3-Dec-08 7:43
sitebuilderLuc Pattyn3-Dec-08 7:43 
GeneralRe: USB information & use? Pin
bac5123-Dec-08 13:27
bac5123-Dec-08 13:27 
GeneralRe: USB information & use? Pin
Luc Pattyn3-Dec-08 14:15
sitebuilderLuc Pattyn3-Dec-08 14:15 

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.