Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 7th, 2006, 02:31 AM
Authorized User
Join Date: Aug 2004
Location: , , .
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default Query Probelm


  I am doing an accounts application. Small company. Backend MSAccess.
Two tables are





Journal contains account payables and account receivables
Transactions contains payment details.

How can i generate a query to display account summary.


suppose, i have 3 purchase invoices in the month Jun, 2006 on dates 1, 7, 15
And I made payments on 6, 9 and 25

The report must show from these two table of the account_id order by date(ascending)

Can anyone help me?
How can I pass parametr to a query in MSAccess from asp.net?

thanx in advance

  #2 (permalink)  
Old June 7th, 2006, 10:48 AM
Friend of Wrox
Points: 2,101, Level: 18
Points: 2,101, Level: 18 Points: 2,101, Level: 18 Points: 2,101, Level: 18
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jul 2003
Location: , , .
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts

Doesn't look like you have the tables defined in the most efficient form. There's no need to duplicate information in tables. You only need to be able to link the tables with foreign keys. I'm not sure what you mean by Journal, but in the simplest form you will need an accounts table and a transactions table. Every transaction will have a transid (Unique ID) and an account_id.

SELECT * from Transactions INNER JOIN Accounts ON Transactions.account_id = Accounts.account_id
WHERE account_id = " & varAccount_ID & " AND DATEPART(month, trdate) = DATEPART(month,'" & varSearchDate & "') AND DATEPART(year, trdate) = DATEPARTYEAR(year,'" & varSearchDate & "') ORDER BY trdate;

Look in the BOL for DATEPART and BETWEEN. ORDER BY by default orders by ascending


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Probelm in DataGrid Display su C# 1 December 8th, 2006 05:00 AM
Kernel compilation probelm shyjumon.n Linux 1 October 24th, 2006 07:49 AM
probelm date format in MsMaskedEditControl shamimbd17 Pro VB 6 0 August 24th, 2006 01:08 AM
Probelm For Runing This Code farhad13841384 ASP.NET 2.0 Professional 0 August 3rd, 2006 01:37 AM
Performance probelm with tomcat manishwaf Servlets 0 May 29th, 2006 06:47 AM

All times are GMT -4. The time now is 06:39 AM.

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