ms-access

C# dataset insert query problem from access database .... valeu

Hello, I'm using Visual Studio 2008 and an Access 2007 database. While I'm trying to create a new insert query in my DataSet, the insert stored procedure mixes up the database field values. I have a print screen of the problem here: http://netplague.eu/Capture.PNG As you can see in the attached print screen the table clients is displa...

How do I implement transactions in Access?

Hello I am stuck implementing a transaction/rollaback feature on an access form. Here's the stripped down outline of what I've done: In the form's Load handler, I start the transaction dbEngine.BeginTrans gInTransaction = true Then, there's a "Cancel" button, whose Click handler goes like dbEngine.Rollback gInTransaction = false ...

How do you get SQL to add a variable to a field name in a where clause?

I am working with MS-Access. I have a table I am modifying, the fields of the table are: NumberOfCycles, s1,s2,s3,s4...s8 the rows have different numbers of s's in them, some have all eight and some have less (the number of s's is specified by NumberOfCycles). The way the table is now I have redundant data so I'll have something like...

minimizing runtime of calculating several ranks (based on grades) on large sql tables, how short can it get (ms access)

Hi everyone, I've been stuck with the rather famous problem of ranking students by grade for a couple weeks now, and while I've learned much, I still haven't solved my problem (the ranks are generated, but the process is too slow): I have a large table (320,000 rows) that contains the student codes (serves as an identifier, instead of t...

Getdate() equivalent for Jet / Access database. Need last month records.

Hello, I was reading other questions posted and found many examples to retrieve last month records. I am using Visual Studio 2008 query builder to retrieve records from an Access mdb and when I enter the following query it is displaying me an error that getdate is not a valid function: where [Transaction Date] between dateadd(...

MS Access 2003 - Having trouble with buttons not working in mde file: list box .rowsource

So I have a form that has a list box and several buttons that run sqk statements for the list box. sub on_onClick() ' error checking me.listbox.rowsource = "SELECT tblMain.First, tblMain.last FROM tblMain ORDER BY tblMain.Last;" so this kinda thing is what I use for the list box. it works fine for me in the .mdb, and after i have co...

Reading image from Access - parameter not valid

Hello. I have simple database in Access .mdb file, but I don't know how to deal with: "parameter not valid" exception when Im creating Image from stream. I'v read that I need to strip 78 bytes offset (from here) but I still get a "parameter not valid" error when I call FromStream, even after stripping off the first 78 bytes. ...

How can I Inner Join two tables in Access when one column is a text and the other is number?

I have a program in access that is using some linked ODBC tables. I had originally had a query that contained the following INNER JOIN: FROM Neptune_FN_Analysis INNER JOIN Neptune_prem ON Neptune_FN_Analysis.PremID = Neptune_prem.premice_id This worked just fine until the column Neptune_prem.premice_id got changed from a number to a...

How do I access other fields in the current row in a query from a custom VBA function?

I would like to write some custom VBA functions to perform calculations on particular fields in a set of queries. This is what I currently have: Public Function TVM(LEN_SEC As Double, ADT_CUR As Integer, TRK_PCT As Integer) TVM = LEN_SEC * ADT_CUR * TRK_PCT / 100# End Function This works fine, but when I create the query I have to...

Subroutine to connect to MS Access database

I have this subroutine setup to connect to a MS Access database: Public Sub MakeDBConnection(ByVal source As String) Try cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & source & ";") cn.Open() Catch e As Exception ReportError("CRITICAL", e.Message) End Try End Sub It is i...

How can I work around the 2GB database limit of MS Access (for displaying images)?

ORIGINAL QUESTION (How can I display images from a MySQL database in an Access 2007 form?) I would like to use Access 2007 to interface to a MySQL database and display pictures and other data in a form. I already have an Access 2007 application that I don't want to change much, if I can help it. I'm just not sure what data type will w...

Connecting to a MS Access database through a function

This is my function: Public Function DBConnection(ByVal path As String) ' This function makes the database connection and returns the object ' to reference it. cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + path + ";") cn.Open() Return cn End Function As you can see, I want to initializ...

ms access outer join to xml

Is there an easy way to produce efficient xml from ms access from an outer join? ie, instead of repeated rows i'd like multiple subkeys so from joining a customer table with an order table, <customer> <custId>1</custId> <order> <orderId>1</orderId> <orderId>2</orderId> </order> </customer> instead of <customer> <custId>1...

How does this actually update the table?

Warning: I am very new to Access coding. I am used to .NET and PHP I just converted an Access 95 program to Access 2007 and I got it all working now I am trying to make some updates. I have a form that updates a table in the database but I can't find an attached query or anywhere where it actually does a SQL statement. Please help. A...

COMPARISON: MS ACCESS & MYSQL

In terms of capacity and performance in manipulating large amounts of data. Which is better, ms access manipulated by vb.net or mysql manipulated by php. ...

Connect to ODBC from Access (Newbie)

Hi: I am spreading my wings into ODBC but need a kick-start. I have the SQL for the query and have ODBC installed (it works in Excel; that's how I got the SQL for the query). I need to know how to connect to the database from Access and pull the data into my table. Can someone please help with that? Thank you, Dave ...

What's the fastest way to check the availability of a SQL Server server?

I have an MS Access program in use in multiple locations. It connects to MS SQL Server tables, but the server name is different in each location. I am looking for the fastest way to test for the existence of a server. The code I am currently using looks like this: ShellWait "sc \\" & ServerName & " qdescription MSSQLSERVER > " & Qt(f...

VBA Access Import Specification strange error

I am trying to import a text file into Access using a saved "Import Specification" in my access database using VBA. The import generates the Import Error table showing the errors in the last two fields. BUT if I use the same import specification manually to import the text file, the Import works perfect !!!!! Strange ..... why would th...

Compiling .NET app as 32-bit only so I can use my Access DB

I keep getting this error when I try and use a MS Access database in my application: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. After Google'ing the error for a while I came to see that this is a problem when running the application in 64-bit mode. If I was to compile the app in 32-bit it wou...

SQL Server 2005 query multiple Access databases?

Is there a way to get SQL Server 2005 to query 3 or more separate Access databases (each returning 1 record) in one SQL statement? ...