473,513 Members | 8,991 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Find Saved Produdct ID Number from Database ?

Fary4u
273 Contributor
Hi

i've got Product ID is Autonumber in MS Access database & Primary Key
& it's save the record into the database

but only problem is

how to find that following record save into database in which following Product ID ?

Expand|Select|Wrap|Line Numbers
  1. Set objConn = Server.CreateObject("ADODB.Connection")
  2. objConn.open . . . .
  3. set objrs = server.createObject("ADODB.RecordSet")
  4. objrs.open "Select * from products",objConn,Adopendynamic,Adlockoptimistic
  5. if objrs.eof then
  6.  
  7. categ=Trim(request("txtcat"))
  8. objrs.Addnew
  9.     objrs("catalogID")=categ
  10. objrs.update
  11.  
  12. ???
  13.  
in advance thanks for reply back.
Oct 17 '07 #1
3 1435
Fary4u
273 Contributor
is that possible ? to get some thing like this output ?
Oct 18 '07 #2
jhardman
3,406 Recognized Expert Specialist
is that possible ? to get some thing like this output ?
I've had this problem before as well. I believe I had to search for it:
Expand|Select|Wrap|Line Numbers
  1. "SELECT id FROM table WHERE field1 = xx AND field2 = 'xxx'"
Now I look at it and think there has to be a better way. Perhaps asking for it immediately after updating?
Expand|Select|Wrap|Line Numbers
  1. rs.update
  2. response.write rs("id")
I haven't tested this, but this is what I would try. I know the previous example works, but I feel there should be a better way.

Jared
Oct 18 '07 #3
Fary4u
273 Contributor
i've try the 2nd way but giving me this error

Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.


i think so the 1st way is the batter well i found the check the prod ID with the last & add 1 extra and pass the value to the next page that's i've done the job

nice to reply from you after a long time

regards
Fary
Oct 19 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
4904
by: Mark | last post by:
I have a working PHP/MySQL application used for data entry. The data entry screen includes a "Save" button. The PHP code for this button looks like this: if (isset($_POST)) { if ($_POST ==...
2
3437
by: Sam White | last post by:
I have set up a MySQL db on one server, IIS 6.0 on another. Using Frontpage I created some forms to input data. On a test page I made, I have 4 fields. First is the ID which is autonumber (I leave...
4
2322
by: Fabian Knopf | last post by:
Hi @ll, when i want to set the PrefetchSize on my database this setting will not be set. DB2 shell says that the command is successfull but when i list my details with. list tablespaces show...
0
3305
by: Zlatko Matić | last post by:
Hi everybody! Recently I was struggling with client/server issues in MS Access/PostgreSQL combination. Although Access is intuitive and easy to use desktop database solution, many problems...
7
1824
by: MLH | last post by:
?dcount("","qryOwnrsDueITSwMissingAddr") when run in the immediate window return a number greater than the number of rows that display when the saved query is run - opening in the database window?...
2
2386
by: tomlebold | last post by:
The function or code below creates a saved query used as the record source for forms and reports. The funtions is called each time a user clicks on a button to display a form or report. This works...
3
2732
by: sean | last post by:
I have a table with fixed row of records SORTED by DATE using ADO pagination method. The user can click a link in one table cell and go to another page to modify the record. Once the updated record...
1
1588
by: campbellbrian2001 | last post by:
I have a product inventory database with a form to enter new products. I used the wizard to add a button to save the new item upon pressing it, however I noticed that the record is saved anyway....
3
2054
by: Richard Hollenbeck | last post by:
I am very sorry about the (almost) re-post, but you will see that my first question wasn't very clear; I have another question I posted this morning called, "in DAO: Run time error 3061 Too few...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7519
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1585
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.