ms-access

Error assigning pass through query to report recordsource in VBA code

坚强是说给别人听的谎言 提交于 2019-12-25 02:56:16
问题 I have the following code : Private Sub Report_Open(Cancel As Integer) On Error GoTo ErrorHandler Dim isPTQueryExists As Integer isPTQueryExists = IsQuery("myTestQuery") If isPTQueryExists = -1 Then Set qdf = CurrentDb.QueryDefs("myTestQuery") qdf.SQL ="my SQL query" Me.RecordSource = "myTestQuery" End If Else Dim DatabaseName As String Dim ServerName As String ServerName = "XXXX" DatabaseName = "XXXX" Set qdf = CurrentDb.CreateQueryDef("myTestQuery") strConnectionString = "XXXX" qdf.Connect

OleDb Exception in c# “No value given for one or more required parameters.” while trying to Select Data from Access database

半腔热情 提交于 2019-12-25 02:56:01
问题 I have the following code: public DataTable opencon(PAL.property objpal) { string query = "Select UserId,Firstname,UserType from TBL_USER_LOGIN where Username=@username and Password=@password and Status=1"; OleDbCommand objcmd = new OleDbCommand(); objcmd.CommandText = query; objcmd.Connection = oldbcon; oldbcon.Open(); objcmd.Parameters.Add("@username", OleDbType.VarChar).Value = objpal.username; objcmd.Parameters.Add("@password", OleDbType.VarChar).Value = objpal.Password; DataTable dt =

Syntax error in INSERT INTO Statement while trying to input values in the Database

a 夏天 提交于 2019-12-25 02:53:14
问题 Hi i basically am creating a registration page. I am getting an error saying "Syntax error in INSERT INTO statement." Also sometimes am getting an Error saying that the connection is open or something. It was working before in a different table and different fields etc...The code is as follows public partial class Registration : System.Web.UI.Page { static OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\New folder\Project 1.0\WebSite1\New Microsoft

How to sort data using DataGridView in VB.NET?

泄露秘密 提交于 2019-12-25 02:46:55
问题 I do not have any idea on how to sort data using datagridview in VB.NET. How do I do this by making use of Textbox to input my query, I'm currently using OLEDB. Here is a picture of what I am trying to do. 回答1: Homework? You cannot exactly sort data using a DataGridView , but you can set the display order of data in a DataGridView . Set the SortedColumn property of your DataGridView object to the DataGridViewColumn by which you want your data sorted. If you need a more complex sorting order,

MS access 2010 ODBC connection to MySQL

纵然是瞬间 提交于 2019-12-25 02:46:55
问题 I've recently learned how to link tables from MySQL to MS access database using OBDC connection but I have the following problem: The application I am building will have increasing number of tables going to a couple of thousands. I want to create tables in the SQL database using VBA in MS Access. How can I automatically link those new tables to the Access application right when I create them in the SQL db? Is this sort of connection the best to use in my case? 回答1: In the same routine where

Need help linking oracle tables in MS Access

北慕城南 提交于 2019-12-25 02:46:12
问题 I am having some issues connection to an oracle DB using MS Access. If I use SQL Developer to connect to the Oracle DB I see pretty much every table and view in the DB however when I connect using MS Access I only get a selected few. I tough it was because the user didn't have Select privileges on the tables I need so I requested the privilege and after a moth of waiting I finally got it but I still cant see the tables on the Access tool. This is what I see on SQL Developer vs MS access. I

VBA Access: Import CSV with additonal header data

老子叫甜甜 提交于 2019-12-25 02:46:10
问题 I am new to coding VBA. Was wondering if you all could help me? I have a CSV file which is structured as the following: - First 22 rows cover the specfic header data(this all loads in one column in excel) - column headers for table are in Row 23 - the data is actually located from row 24 onward. What the code needs to do is insert this data in new table with the right column titles. Also while inserting it needs to input the file name and header data in the first few columns of the table. So

files needed for deploying delphi 2010 with ms access 2007 and ado for database connection

女生的网名这么多〃 提交于 2019-12-25 02:44:58
问题 I'm building database application with delphi 2010 in which the database i used is ms access 2007 and ado as the connection.... then, i used installshield express from delphi 7 to do the deployment.... i open the setup file in my computer and there is no problem with it..but when i open the setup file in client computer, there is some error... what makes me confused is what files needed to be added in the setup file for the deployment? i've installed mdac 2.8 sp1 in the client, but it's still

MS Access 2007 - OpenArgs not passing the value to next form?

痴心易碎 提交于 2019-12-25 02:44:18
问题 So I pass the ID value from one form to the next using Docmd.OpenForm "SecondForm",,,,,, MainID Docmd.Close AcForm, "FirstForm", acSaveYes and then I check the value on the Second Form's load event: MainID = val(Me.OpenArgs) and when I debug and step through I hover over this and can see it contains a value Then I have a button click event on the Second Form that is supposed to repeat the process, but when I run the following Dim rs as DAO.Recordset Dim dbs as DAO.Database Set dbs = CurrentDB

In operator without () in query expression

自古美人都是妖i 提交于 2019-12-25 02:39:10
问题 error: In operator without () in query expression '(EnrollmentsTbl.UserName LIKE ? IN '' [;DATABASE=e:\web\mcfrsitcom0\htdocs\trackingHIPAA\App_Data\subsite.mdb])'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.OleDb.OleDbException: In operator without () in query expression '(EnrollmentsTbl.UserName LIKE ? IN ''