Click here to Skip to main content
16,006,845 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: recommendation for high quality .NET extension library Pin
Paul Conrad28-Jul-12 11:44
professionalPaul Conrad28-Jul-12 11:44 
GeneralRe: recommendation for high quality .NET extension library Pin
Dave Kreskowiak28-Jul-12 14:13
mveDave Kreskowiak28-Jul-12 14:13 
AnswerRe: recommendation for high quality .NET extension library Pin
Pete O'Hanlon28-Jul-12 20:35
mvePete O'Hanlon28-Jul-12 20:35 
AnswerRe: recommendation for high quality .NET extension library Pin
Florian Rappl28-Jul-12 23:04
professionalFlorian Rappl28-Jul-12 23:04 
GeneralRe: recommendation for high quality .NET extension library Pin
BillWoodruff29-Jul-12 1:38
professionalBillWoodruff29-Jul-12 1:38 
GeneralRe: recommendation for high quality .NET extension library Pin
BillWoodruff29-Jul-12 2:31
professionalBillWoodruff29-Jul-12 2:31 
GeneralRe: recommendation for high quality .NET extension library Pin
Florian Rappl29-Jul-12 3:10
professionalFlorian Rappl29-Jul-12 3:10 
QuestionExecutenonquery: Connection Property Has Not Been Initialized, VS 2008 Pin
Member 931468428-Jul-12 4:46
Member 931468428-Jul-12 4:46 
Hi everybody,
i am trying to insert the values into a Laptop table which has a primary key as autonumber . I am using Access 2007 as my database and VB.NET as my front end . This is the code i have written
VB
Private Sub addLaptopForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        con = New OleDb.OleDbConnection
        con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Documents and Settings\Jain\My Documents\jainProto3m.mdb"
        Me.TblLaptopTableAdapter1.Fill(Me.JainProto3mDataSet1.tblLaptop)

        Dim cmd As New OleDb.OleDbCommand
        Dim dr As OleDbDataAdapter
        Dim ds As DataSet

        Try
            con.Open()
            Try
                cmd.Connection = con
                'To get the Max value from the table Laptops
                Dim qrymax As String
                qrymax = "SELECT MAX(pkLaptopID) as abc FROM tblLaptop"
                'Here we place the query in the command text
                cmd.CommandText = qrymax

                'Here we create a new instances of the data set and the adapter and pass the 
                'query into the data Adapter through which we fill the data set 
                ds = New DataSet()
                dr = New OleDbDataAdapter(cmd)
                dr.Fill(ds)

                'here we convert the value from string to Integer
                Dim i As Integer
                Dim g As String
                g = ds.Tables(0).Rows(0).Item("abc").ToString()
                i = Convert.ToInt32(g) + 1
                Me.txtAddLaptopLaptopID.Text = i.ToString()



            Catch ex As Exception
                MsgBox(ex.Message, MsgBoxStyle.Critical)
            End Try



        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical)
            Exit Sub
        Finally
            'dbCommandins.Dispose()
            con.Close()


        End Try

    End Sub



i am getting the following error
VB
CODE
no value given for one or more required parameter.


I'd really appreciate any suggestions thank you.
I new to VB.NET , I am VB.NET 2008,
Regards
Jain

GeneralRe: Executenonquery: Connection Property Has Not Been Initialized, VS 2008 Pin
Eddy Vluggen28-Jul-12 7:26
professionalEddy Vluggen28-Jul-12 7:26 
RantOpen XML SDK - Word 2007 Uri Issue Pin
Ed Hill _5_27-Jul-12 1:49
Ed Hill _5_27-Jul-12 1:49 
Questionwindow service with taskbar notification Pin
madanbhanu26-Jul-12 22:00
madanbhanu26-Jul-12 22:00 
AnswerRe: window service with taskbar notification Pin
Pete O'Hanlon26-Jul-12 22:15
mvePete O'Hanlon26-Jul-12 22:15 
GeneralRe: window service with taskbar notification Pin
madanbhanu27-Jul-12 3:05
madanbhanu27-Jul-12 3:05 
AnswerRe: window service with taskbar notification Pin
Bernhard Hiller26-Jul-12 23:42
Bernhard Hiller26-Jul-12 23:42 
GeneralRe: window service with taskbar notification Pin
madanbhanu27-Jul-12 3:07
madanbhanu27-Jul-12 3:07 
AnswerRe: window service with taskbar notification Pin
Eddy Vluggen27-Jul-12 3:21
professionalEddy Vluggen27-Jul-12 3:21 
QuestionGet path of Files accessed or in use by a process , without using Handle or other tools Pin
MayankNainwal26-Jul-12 1:47
MayankNainwal26-Jul-12 1:47 
QuestionRe: Get path of Files accessed or in use by a process , without using Handle or other tools Pin
Eddy Vluggen26-Jul-12 2:05
professionalEddy Vluggen26-Jul-12 2:05 
AnswerRe: Get path of Files accessed or in use by a process , without using Handle or other tools Pin
Dave Kreskowiak26-Jul-12 3:53
mveDave Kreskowiak26-Jul-12 3:53 
Questionis there an Entity code to database shortcut? Pin
neodeaths23-Jul-12 6:59
neodeaths23-Jul-12 6:59 
AnswerRe: is there an Entity code to database shortcut? Pin
Dave Kreskowiak24-Jul-12 3:51
mveDave Kreskowiak24-Jul-12 3:51 
Questionclass library Pin
nitishvr20-Jul-12 22:38
nitishvr20-Jul-12 22:38 
AnswerRe: class library Pin
Richard MacCutchan21-Jul-12 1:18
mveRichard MacCutchan21-Jul-12 1:18 
AnswerRe: class library Pin
Abhinav S22-Jul-12 20:07
Abhinav S22-Jul-12 20:07 
AnswerRe: class library Pin
_Amy23-Jul-12 1:32
professional_Amy23-Jul-12 1:32 

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.