I am building a client referral tool. When a potential client makes a purchase inquiry, I want to send the inquiry request to a product dealer in the city specified by the client. I have a table with a list of dealers sorted by city.
One complication is that I need the referral tool to select only a single dealer from a list of potential dealers in that city.
My question is this: I can query the dealers with a WHERE statement to group my results on a specific city. This will give a number of results in my recordset. How do I select only a specific record from a recorset?
I was told that I could use a cursor to accomplish this task. My problem is that I am unsure how to write a cursor for access - and if it is possible, can I write one in a Cold Fusion Query? CF passes queries in an ODBC compatible format.
Any ideas? I have never written a cursor before and have only just read about it. If you have a suggestion, I would really appreciate any examples you could provide.
Thanks.
One complication is that I need the referral tool to select only a single dealer from a list of potential dealers in that city.
My question is this: I can query the dealers with a WHERE statement to group my results on a specific city. This will give a number of results in my recordset. How do I select only a specific record from a recorset?
I was told that I could use a cursor to accomplish this task. My problem is that I am unsure how to write a cursor for access - and if it is possible, can I write one in a Cold Fusion Query? CF passes queries in an ODBC compatible format.
Any ideas? I have never written a cursor before and have only just read about it. If you have a suggestion, I would really appreciate any examples you could provide.
Thanks.