[ic] no access for database

graham hadgraft graham.hadgraft at gmail.com
Thu Jul 19 05:03:30 EDT 2007


Hi Gert

This is a new table i have created.

I can perform queries on this table outside of the perl tags
successfully, both select and insert queries.

The page actually loops through a large form on the previous which has
a couple of 100 fields for various items these fields are numbered
1,2,3, etc. When it loops whrough it checks if it has a value inside
it and if it does it does an insert query.


for($i=1;$i<=$count;$i++) {
		

		my $quantity = $CGI->{$i._quantity};
		if ($quantity) {
			my $sku = $CGI->{$i._sku};
			my $description = $CGI->{$i._description};
			my $price = $CGI->{$i._price};		
			my $weight = $CGI->{$i._weight};
			my $group_text = $CGI->{$i._group_text};
			my $group_selected = $CGI->{$i._group_selected};
			my $category = $CGI->{$i._category};

			my $group;

			if ($group_text) {
				$group = $group_text;
			} else {
				$group = $group_selected;
			}
			$sql = "INSERT INTO quote_items VALUES ('$code', '$project', '1n',
'$sku', '$description', '$quantity', '$price', '$weight', '$group',
'$category', '', '')";
			my $ins = $Tag->query({
	    			 sql => $sql,
   				 hashref => 'ins',
			});

			$code++;
		}

			
	}

Heres the code which may make it a bit clearer wqhta i am trying to do.

On 19/07/07, ic at 3edge.com <ic at 3edge.com> wrote:
> > I am trying to use the query tag in perl however i receive the
> > following error.
> >
> > table products: Query on table quote_items failed: no access for
> > database quote_items at
> > /var/www/vhosts/jobs.avunit.com/interchange/lib/Vend/Data.pm line
> > 1055. Query was: INSERT INTO quote_items VALUES ('25', '10', '1',
> > 'CONF-LAB-LABAUD', 'Audio Engineer. Standard day rate', '7', '195.00',
> > '', 'Labour', '', '', '')
> >
> > I have looked at this and added the following bit to my perl opening
> > tag so that it now has.
> >
> > [perl tables=quote_items]
> >
> > however i still get this error.  How do i give this permission for
> > interchange to place new items in this table.
>
> - is this a new table, or an already existing table?
> - have you been doing other queries on this table in other locations without problems?
> - could you provide more context regarding the problem?
>
> CU,
>
> Gert
>
>
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>


More information about the interchange-users mailing list