Click here to Skip to main content
15,910,234 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questiondatagrid titel change Pin
microuser_20004-Sep-05 7:47
microuser_20004-Sep-05 7:47 
Questioncontrol richtextbox Pin
ecentinela4-Sep-05 4:10
ecentinela4-Sep-05 4:10 
AnswerRe: control richtextbox Pin
progload4-Sep-05 10:54
progload4-Sep-05 10:54 
Question.NET Application books Pin
hcmuns4-Sep-05 1:56
susshcmuns4-Sep-05 1:56 
AnswerRe: .NET Application books Pin
Christian Graus4-Sep-05 10:58
protectorChristian Graus4-Sep-05 10:58 
QuestionTypeDescriptor Pin
militiaware3-Sep-05 15:23
militiaware3-Sep-05 15:23 
AnswerRe: TypeDescriptor Pin
Dave Kreskowiak4-Sep-05 6:33
mveDave Kreskowiak4-Sep-05 6:33 
Questionsql error message Pin
microuser_20003-Sep-05 10:22
microuser_20003-Sep-05 10:22 
hellow i am coding a program ...
i am trying to pick a value from the datagrid ...
i pick the value fine !
but when i run the sql statment i recive the next error
"no value given for one or more required parameters"
here is the code .
Dim sConnection, ssql As String
Dim cellnum As Object
Dim row As Integer = DataGrid1.CurrentCell.RowNumber
Dim coll As Integer = DataGrid1.CurrentCell.ColumnNumber
cellnum = (DataGrid1(row, coll))
MessageBox.Show(cellnum)


Try

sConnection = "provider=microsoft.jet.oledb.4.0;data source=C:\Printers.mdb"
ssql = "Select * From [add] Where (Num ="
ssql = ssql & "'" & cellnum & "')"

MessageBox.Show(ssql)
Dim OleDbConn As OleDbConnection = New OleDbConnection(sConnection)
OleDbConn.Open()
Dim MyDataReader As OleDbDataReader
Dim MyOleDbCommand As OleDbCommand = New OleDbCommand

Dim MyDataSet As DataSet = New DataSet
Dim MyOleDataAdapter As OleDbDataAdapter = New OleDbDataAdapter
MyOleDataAdapter.SelectCommand = New OleDbCommand(ssql, OleDbConn)
MyOleDataAdapter.Fill(MyDataSet)
MyOleDbCommand.Connection = (OleDbConn)
MyOleDbCommand.CommandText = ssql

MyDataReader = MyOleDbCommand.ExecuteReader


Do While MyDataReader.Read

txt_type.Text = (MyDataReader("Machine_Type"))
txt_model.Text = (MyDataReader("Machine_Model"))
txt_serial.Text = (MyDataReader("Machine_Serial"))

Loop


MyDataReader.Close()
OleDbConn.Close()
OleDbConn.Dispose()

Catch err As System.Exception
MessageBox.Show(err.Message)
End Try

thxx great board !
AnswerRe: sql error message Pin
CooperWu3-Sep-05 21:47
CooperWu3-Sep-05 21:47 
AnswerRe: sql error message Pin
CooperWu3-Sep-05 21:49
CooperWu3-Sep-05 21:49 
AnswerRe: sql error message Pin
microuser_20003-Sep-05 22:46
microuser_20003-Sep-05 22:46 
GeneralRe: sql error message Pin
Christian Graus4-Sep-05 10:58
protectorChristian Graus4-Sep-05 10:58 
GeneralRe: sql error message Pin
Dave Kreskowiak5-Sep-05 3:02
mveDave Kreskowiak5-Sep-05 3:02 
Questionwe need help for this project Pin
kenvil3-Sep-05 7:00
kenvil3-Sep-05 7:00 
AnswerRe: we need help for this project Pin
quacks_a_lot3-Sep-05 16:47
quacks_a_lot3-Sep-05 16:47 
GeneralRe: we need help for this project Pin
kenvil4-Sep-05 0:23
kenvil4-Sep-05 0:23 
GeneralRe: we need help for this project Pin
quacks_a_lot4-Sep-05 8:43
quacks_a_lot4-Sep-05 8:43 
GeneralRe: we need help for this project Pin
kenvil5-Sep-05 6:48
kenvil5-Sep-05 6:48 
AnswerRe: we need help for this project Pin
rwestgraham4-Sep-05 0:16
rwestgraham4-Sep-05 0:16 
Questionimporting CSV file using DAO - force field to be varChar (string) Pin
Anonymous3-Sep-05 6:03
Anonymous3-Sep-05 6:03 
AnswerRe: importing CSV file using DAO - force field to be varChar (string) Pin
Dave Kreskowiak3-Sep-05 6:56
mveDave Kreskowiak3-Sep-05 6:56 
GeneralRe: importing CSV file using DAO - force field to be varChar (string) Pin
Anonymous3-Sep-05 17:42
Anonymous3-Sep-05 17:42 
GeneralRe: importing CSV file using DAO - force field to be varChar (string) Pin
Dave Kreskowiak4-Sep-05 6:27
mveDave Kreskowiak4-Sep-05 6:27 
Questionhow to connect via dsn Pin
MODI_RAHUL3-Sep-05 4:23
MODI_RAHUL3-Sep-05 4:23 
AnswerRe: how to connect via dsn Pin
Dave Kreskowiak3-Sep-05 6:11
mveDave Kreskowiak3-Sep-05 6: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.