Results 1 to 8 of 8

Thread: Microsoft Access

  1. #1
    Registered+
    Join Date
    Jul 2003
    Location
    123 Fake Street, London
    Posts
    811
    Thanks
    35
    Thanked
    3 times in 3 posts

    Microsoft Access

    Is it possible to run separate queries consecutively using Microsoft Access with just one command and for those queries to share parameters entered by the user?

    The version of Access is 97 unfortunately

    Thanks.
    "Keyboard missing - press F3 to continue" Message seen on an Apricot PC.
    "To start press any key. Where's the any key?" Homer Simpson.
    Hexus Trust

  2. #2
    Member
    Join Date
    Sep 2003
    Location
    Peterborough
    Posts
    147
    Thanks
    0
    Thanked
    0 times in 0 posts
    You can do that in an Access Basic module easily.

    If you'd asked me back in 1997, I could probably have written the code in less time than it took to reply, but my Access is rather rusty these days.

    You can runs queries consecutively in a macro, but I can't remember how to (or even if it is possible to) parameterize queries in a macro.

  3. #3
    Registered+
    Join Date
    Jul 2003
    Location
    123 Fake Street, London
    Posts
    811
    Thanks
    35
    Thanked
    3 times in 3 posts
    Access Basic module, I shall look it up, thanks.

    Solutions do not have to be Access specific; I am not a fan myself after using it. Is there any particular SQL code that I can use?
    "Keyboard missing - press F3 to continue" Message seen on an Apricot PC.
    "To start press any key. Where's the any key?" Homer Simpson.
    Hexus Trust

  4. #4
    Member
    Join Date
    Sep 2003
    Location
    Peterborough
    Posts
    147
    Thanks
    0
    Thanked
    0 times in 0 posts
    All SQL databases come with some way of sending raw SQL commands to the server from a command prompt, and a set of libraries that allow you to send SQL commands from any programming language.

    With MS SQL Server, the command line tool is called iSQL, and a simple batch file would allow you to run several queries with a set of shared parameters. If you need anything more complex, then you could call the SQL routines from within a simple VB app.

    Basically, pick any programming language, and any SQL server, and it will be able to do what you want.

  5. #5
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,026 times in 677 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS
    Quote Originally Posted by oyster
    All SQL databases come with some way of sending raw SQL commands to the server from a command prompt, and a set of libraries that allow you to send SQL commands from any programming language.

    With MS SQL Server, the command line tool is called iSQL, and a simple batch file would allow you to run several queries with a set of shared parameters. If you need anything more complex, then you could call the SQL routines from within a simple VB app.

    Basically, pick any programming language, and any SQL server, and it will be able to do what you want.
    if you're going as far as to write your own app, then you may find obdc a bit more efficient and backend-generic than stringing together command line sql INSERTs

  6. #6
    Member
    Join Date
    Sep 2003
    Location
    Peterborough
    Posts
    147
    Thanks
    0
    Thanked
    0 times in 0 posts
    yeah, sorry, I didn't mean to suggest that stringing together command line SQL commands was a sensible way of doing this in VB. Each language will have its own libraries for SQL access, and ODBC is the most common, although MS is pushing .NET on us all these days, so you could buy a couple of books on C# or VB.NET and ADO.NET, then get paid silly money for having .NET development experience.

  7. #7
    Registered+
    Join Date
    Jul 2003
    Location
    123 Fake Street, London
    Posts
    811
    Thanks
    35
    Thanked
    3 times in 3 posts
    Thank-you for the info.

    Do you know of any examples of iSQL being used? Been looking around in Google but not come across anything yet.

    ODBC, I seem to remember doing something like that at Uni, more Googling for me.
    "Keyboard missing - press F3 to continue" Message seen on an Apricot PC.
    "To start press any key. Where's the any key?" Homer Simpson.
    Hexus Trust

  8. #8
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,026 times in 677 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS
    odbc is a generic database backend allowing app A to read/write generic sql from database backend B (be it mysql, mssql, or msjet) pretty much transparently.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Microsoft Support....
    By Devilbod in forum General Discussion
    Replies: 14
    Last Post: 09-04-2007, 02:42 AM
  2. Replies: 4
    Last Post: 18-08-2004, 06:58 AM
  3. Microsoft Access 2003 - Dynamic Time?
    By Jonny M in forum Software
    Replies: 3
    Last Post: 01-05-2004, 11:44 PM
  4. New RPC hotfix from Microsoft
    By Paul Adams in forum Software
    Replies: 12
    Last Post: 14-09-2003, 08:44 AM
  5. Microsoft Access Question...
    By TomWilko in forum Software
    Replies: 2
    Last Post: 24-08-2003, 12:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •