| | |
Help with Visual Studio 2008
Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Sep 2008
Posts: 11
Reputation:
Solved Threads: 0
I'm receiving error message "ExecuteReader got No value given for one or more required parameters", any help with this is appreciated. (using Access 2003)
Public Class frmDisplayJV
Private Sub DisplayJV_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cbJVDate.Items.Clear()
Dim ADate, SQLStmt As String
Dim ACounter As Integer
Dim DBCnxn As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.JET.OLEDB.4.0;" & "Data Source=DB.mdb")
SQLStmt = "select distinct format([AccountingDate],'yyyy-mm-dd') as AcctgDate from Orders order by format([AccountingDate],'yyyy-mm-dd') DESC"
Dim DateCommand As New System.Data.OleDb.OleDbCommand(SQLStmt, DBCnxn)
Dim DateReader As System.Data.OleDb.OleDbDataReader
DBCnxn.Open()
Try
DateReader = DateCommand.ExecuteReader
Catch ex As Exception
MsgBox("ExecuteReader got " & ex.Message)
Exit Sub
End Try
ACounter = 0
Do While DateReader.Read()
ADate = DateReader.Item("AcctgDate")
cbJVDate.Items.Add(ADate)
If ACounter = 0 Then cbJVDate.Text = ADate
ACounter += 1
Loop
DBCnxn.Close()
'lblAdvice.ForeColor = ForeColor.Black'
lblAdvice.Text = "Select the date to journalize from the drop down box..."
Me.cbJVDate.Focus()
End Sub
Public Class frmDisplayJV
Private Sub DisplayJV_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cbJVDate.Items.Clear()
Dim ADate, SQLStmt As String
Dim ACounter As Integer
Dim DBCnxn As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.JET.OLEDB.4.0;" & "Data Source=DB.mdb")
SQLStmt = "select distinct format([AccountingDate],'yyyy-mm-dd') as AcctgDate from Orders order by format([AccountingDate],'yyyy-mm-dd') DESC"
Dim DateCommand As New System.Data.OleDb.OleDbCommand(SQLStmt, DBCnxn)
Dim DateReader As System.Data.OleDb.OleDbDataReader
DBCnxn.Open()
Try
DateReader = DateCommand.ExecuteReader
Catch ex As Exception
MsgBox("ExecuteReader got " & ex.Message)
Exit Sub
End Try
ACounter = 0
Do While DateReader.Read()
ADate = DateReader.Item("AcctgDate")
cbJVDate.Items.Add(ADate)
If ACounter = 0 Then cbJVDate.Text = ADate
ACounter += 1
Loop
DBCnxn.Close()
'lblAdvice.ForeColor = ForeColor.Black'
lblAdvice.Text = "Select the date to journalize from the drop down box..."
Me.cbJVDate.Focus()
End Sub
![]() |
Similar Threads
- Visual Studio FTP problems - FTP doesn't work (Windows NT / 2000 / XP)
- visual studio 2008 pocket pc windows 2002 (Windows Software)
- VB 6 or Visual Studio 2008 Express (VB.NET)
- Learning visual studio 2008 (C++)
- Visual Studio 2008 Form Designer Issues (VB.NET)
- WPF Grid with Visual Studio 2008 (VB.NET)
- Visual Studio 2008 Data Source Selection (ASP.NET)
- read/write files using visual studio 2009 (VB.NET)
- ifstream and ofstrem problem with visual studio 2008 (C++)
Other Threads in the VB.NET Forum
- Previous Thread: Help with Advancing to Next Record, read line continued iteration problem
- Next Thread: Help with Visual Studio 2008
Views: 513 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net 2005 2008 access account application arithmetic array arrays basic bing button buttons c# center check checkbox code convert crystalreport data database datagrid datagridview date design designer dissertation dissertations dropdownlist excel fade file-dialog ftp generatetags google gridview hardcopy images inline input insert installer intel internet listview mobile monitor ms net networking objects output passingparameters picturebox picturebox1 port print printing problem project remove save searchbox searchvb.net select serial server shutdown soap sorting studio survey syntax table tcp temperature text textbox time timer toolbox trim update updown user validation vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio2008 web winforms wpf





