I am using Microsoft Access as my database and currently I am facing a problem, how can I prevent from hard code?
Such as
Code:
WHERE ID = 1
. Can I use something to replace 1 to make it more dynamic? Which mean once I update from my database table, then the data will automatic up to date for me without opening up my code to change
I'm not sure I understand your question. Do you want to code something that will replace an automatic increment in the database? Or are you asking about a dynamic server-side language like ASP, PHP, ColdFusion, etc?
__________________ ^_^
If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
* The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
are you using VB macros or a windows form or a webform or ? what is calling the access this link is on straight up macros for access DB's- if you are hitting it from a form or web page you will need to hit it with an OLE connection- you can reference it here
I'm not sure I understand your question. Do you want to code something that will replace an automatic increment in the database? Or are you asking about a dynamic server-side language like ASP, PHP, ColdFusion, etc?
Hi WolfShade,
I am asking about a dynamic server-side language and I am using PHP + microsoft access as my database.
are you using VB macros or a windows form or a webform or ? what is calling the access this link is on straight up macros for access DB's- if you are hitting it from a form or web page you will need to hit it with an OLE connection- you can reference it here
Hi alykins,
So sorry that I can't understand what you mean as I am just a very new incomer.
You answered my Q in your reply to WolfShade- you are using a php web page to access the database. I don't know php; sry
The first link I provided though tells you how to make a "stored procedure" in access DB- all you need to do then is call it. Your "hard coded values" would be parameters. So according to their reply you could make something like
Code:
CREATE PROCEDURE usp_GetName
(param1 INT) AS
SELECT [fName]
FROM tbl_People
WHERE id = param1
You answered my Q in your reply to WolfShade- you are using a php web page to access the database. I don't know php; sry
The first link I provided though tells you how to make a "stored procedure" in access DB- all you need to do then is call it. Your "hard coded values" would be parameters. So according to their reply you could make something like
Code:
CREATE PROCEDURE usp_GetName
(param1 INT) AS
SELECT [fName]
FROM tbl_People
WHERE id = param1
Hi alykins,
Oh I see, okay :P
Anyway, I need to spend some time to look in deep & thank you so much.