Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 17th, 2007, 06:15 PM
Registered User
 
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How can I work with OLEDB?

************************************************** *************
hi, i tested this Walkthrough.
http://msdn.microsoft.com/library/de...InWebForms.asp
************************************************** *************
i can run this command with SqlCommand

UPDATE Categories
SET CategoryName = @categoryname, Description = @categorydescription WHERE (CategoryID = @categoryid)

   With sqlcommandUPDATE
      .Parameters("@ID").Value = ListBox.selectedtext
      .Parameters("@name").Value = txtName.Text
      .Parameters("@description").Value = txtdescription.Text
   End With

?????????????????????????????????????????????????? ?????????

But my code for OLEDB is not execute this sql command.

UPDATE Categories SET CategoryName = ?, Description = ? WHERE (CategoryID = ?)

        With cmdCategoriesUpdate
            .Parameters("ID").Value = ListBox.selectedtext
            .Parameters("Name").Value = txtCategoryName.Text
            .Parameters("Description").Value = txtDescription.Text
        End With
?????????????????????????????????????????????????? ???????????

and i added this lines in my codes

        cmdCategoriesUpdate.Parameters.Add(New OleDb.OleDbParameter("ID", OleDb.OleDbType.VarChar, 5, "ID"))
        cmdCategoriesUpdate.Parameters.Add(New OleDb.OleDbParameter("Name", OleDb.OleDbType.VarChar, 15, "Name"))
        cmdCategoriesUpdate.Parameters.Add(New OleDb.OleDbParameter("Description", OleDb.OleDbType.VarChar, 16, "Description"))

Can you tell me a little bit?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Jet OLEDB sureshkumarct Visual C++ 0 May 30th, 2006 02:00 AM
oledb or odbc? rupen Classic ASP Databases 2 September 28th, 2005 01:58 AM
ADODB works but OleDB does not! humour ADO.NET 7 August 3rd, 2004 04:21 AM
Chapter 16 the OLEdb Way? solva VB.NET 2002/2003 Basics 11 February 1st, 2004 04:44 PM
Connecting to an oledb datasource SteveNunn .NET Web Services 2 August 7th, 2003 04:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.