Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. "System.Data.OleDb.OleDbException" Im very confused whats the real error?!! Please help!!... [modified]

"System.Data.OleDb.OleDbException" Im very confused whats the real error?!! Please help!!... [modified]

Scheduled Pinned Locked Moved Visual Basic
helpvisual-studioannouncementcsharpdatabase
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vbDiggerz
    wrote on last edited by
    #1

    Im using Visual Studio 2005 VB in language.. i have a "application project " and compiled to produce EXE application installer.. the title is "EMPLOYEE DATABASE MANAGEMENT SYSTEM" This application is a customized user interface that manage all the employee data from an access database... it gets the data and display and you can edit, delete, update the employee information using that custom system software "EMPLOYEE DATABASE MANAGEMENT SYSTEM" >>My OS is windows vista ultimate. >>My Developing Tool is VS Studio 2005 Pro VB >>my application package library or Installer Dependencies or i mean all component library or "dll" which are necessary are: -stdole.dll -adodb.dll -msdatasrc.dll -Microsoft.stdformat.dll -Microsoft.Buil.Conversion.dll -Microsoft.VisualBasic.dll -Microsoft.VisualBasic.Compatibilty.dll >>the database i use to access with my application is ACCESS 2000 version >>and my "software" application, database connection is using OleDbConnection and ADODB Connection so? stdole.dll is for OleDbConnection.. im i right? and adodb.dll is for ADODB Connection/Manipulation.. im i right? when i run this installer to my "PC" Win.VistaUltimate and other computer Win2000Pro english version "WITH" or "WITHOUT" MS OFFICE 2003 english version or i mean no MS Office at all.. and after that i run the installed "EMPLOYEE DATABASE MANAGEMENT SYSTEM" application? it pops up and prompt my application "LOGIN Form" before entering the entire application... and after you fill-up, my LOGIN Form will connect to the access database 2000 and try to search valid user login then after confirm? my LOGIN Form will open the table "USER_LOG_TIMEIN" for example.. and insert the user time of login... i just justified that there is reading and updating transaction between my application from the start you open my application and start to login... and im using OleDbConnection... and finally?? my application run smoothly!!! but there is a problem i can't figure it out myself and very confusing part.. that when i try to install my application to laptop with OS of Windows 2000 Prof. Japenese version with an MS Office 2003 English en Japanese version... the application installed properly and when i try to run the my application??? it pops-up or prompt the LOGIN form... and when i try to fill-up my user account and password... then hit the enter or login??? then the error message pops-up "System.Data.OleDb.OleDbException" "System.Data.OleDb.OleDbCommand.ExecuteCommandTe

    D 1 Reply Last reply
    0
    • V vbDiggerz

      Im using Visual Studio 2005 VB in language.. i have a "application project " and compiled to produce EXE application installer.. the title is "EMPLOYEE DATABASE MANAGEMENT SYSTEM" This application is a customized user interface that manage all the employee data from an access database... it gets the data and display and you can edit, delete, update the employee information using that custom system software "EMPLOYEE DATABASE MANAGEMENT SYSTEM" >>My OS is windows vista ultimate. >>My Developing Tool is VS Studio 2005 Pro VB >>my application package library or Installer Dependencies or i mean all component library or "dll" which are necessary are: -stdole.dll -adodb.dll -msdatasrc.dll -Microsoft.stdformat.dll -Microsoft.Buil.Conversion.dll -Microsoft.VisualBasic.dll -Microsoft.VisualBasic.Compatibilty.dll >>the database i use to access with my application is ACCESS 2000 version >>and my "software" application, database connection is using OleDbConnection and ADODB Connection so? stdole.dll is for OleDbConnection.. im i right? and adodb.dll is for ADODB Connection/Manipulation.. im i right? when i run this installer to my "PC" Win.VistaUltimate and other computer Win2000Pro english version "WITH" or "WITHOUT" MS OFFICE 2003 english version or i mean no MS Office at all.. and after that i run the installed "EMPLOYEE DATABASE MANAGEMENT SYSTEM" application? it pops up and prompt my application "LOGIN Form" before entering the entire application... and after you fill-up, my LOGIN Form will connect to the access database 2000 and try to search valid user login then after confirm? my LOGIN Form will open the table "USER_LOG_TIMEIN" for example.. and insert the user time of login... i just justified that there is reading and updating transaction between my application from the start you open my application and start to login... and im using OleDbConnection... and finally?? my application run smoothly!!! but there is a problem i can't figure it out myself and very confusing part.. that when i try to install my application to laptop with OS of Windows 2000 Prof. Japenese version with an MS Office 2003 English en Japanese version... the application installed properly and when i try to run the my application??? it pops-up or prompt the LOGIN form... and when i try to fill-up my user account and password... then hit the enter or login??? then the error message pops-up "System.Data.OleDb.OleDbException" "System.Data.OleDb.OleDbCommand.ExecuteCommandTe

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      vbDigger'z wrote:

      myOleCommand = New OleDbCommand("Insert Into tblLogHistory(Log_ID,Log_Name,Time_In,Date_In,Computer_Name) " & _ "Values ('" & .lblIDNo.Text & "','" & .lblActiveUser.Text & "',#" & Format(Now, "hh:mm tt") & "#," & _ "#" & Format(Now, "MM/dd/yyyy") & "#, '" & System.Net.Dns.GetHostName.ToUpper & "')", myOleConnection)

      This is all garbage. Rewrite this code to use a parameterized query instead of string concantentation to build the query directly. The OleDbParameter objects will worry about formatting each value for you to so you can limit strange errors like this. Search the articles for "SQL Injection" and you'll come up with a very good article by Colin Angus Mackay describing the concepts and showing examples.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups