Is it necessary to use Access to manage the relationship?
If your tables are:
servers_tbl
-----------
server_id (autonumber)
server_name (text)
drives_tbl
----------
drive_id (autonumber)
server_id (number)
drv_letter (text)
total_disk_size (number)
free_space_remaining (number)
then why not try inserting the server_id yourself?
# lookup the server id
my $server_id = LookupServerID($srv);
$perms_db->Sql ("INSERT INTO $drives_tbl (server_id,drv_letter,total_d
+isk_size,free_space_remaining) VALUES ( $server_id, '$drv_letter', $t
+otal_disk_size,$free_space_remaining)");
and code up the appropriate lookup call...
sub LookupServerID
{
my $serverName = shift;
my $sql = "select server_id from server_tbl where server_name = '$
+serverName'"
# run the sql through your $perms_db and return the id
# you'll probably want to cache these values later...
}
Hope this helps.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.