Ø
Øyvind Isaksen
Hello!
I store from 1 to 50 (depending on input from user) image names in session
variables (not array), and put them in variables like this:
For X = 1 To 50
Execute("varImage_" & X & " = Session(""image_" & X & """)")
Next`
This work perfect, output is like this:
varImage_1 = session("image_1")
varImage_2 = session("image_2")
varImage_3 = session("image_3") and so on...
---Here is what I try to do:--------------
Now I'm stucked with almost the same "problem"... I need to create ut to 50
SQL's in a loop like the other code.
This code under will explain what I try to do, X shall go from 1 to 50. I
just need to get this correct:
For X = 1 To 50
if varImage_X <> "" then SQL_X = "insert into tblImage (path,sort,artID)
values ('"&varImage_X&"','X','"&dbArtID&"'); "
'Make variable SQL_SaveImgs with all the SQL's:
if varImage_X <> "" then SQL_SaveImgs = SQL_SaveImgs & SQL_X
Next
How can I do this so it works??
-------------------------------------------
Try to get this output:
if varImage_1 <> "" then SQL_X = "insert into tblImage (path,sort,artID)
values ('"&varImage_1&"','1','"&dbArtID&"'); "
if varImage_2 <> "" then SQL_X = "insert into tblImage (path,sort,artID)
values ('"&varImage_2&"','2','"&dbArtID&"'); "
if varImage_3 <> "" then SQL_X = "insert into tblImage (path,sort,artID)
values ('"&varImage_3&"','3','"&dbArtID&"'); " and so on....
if varImage_1 <> "" then SQL_SaveImgs = SQL_SaveImgs & SQL_1
if varImage_2 <> "" then SQL_SaveImgs = SQL_SaveImgs & SQL_2
if varImage_3 <> "" then SQL_SaveImgs = SQL_SaveImgs & SQL_3 and so on....
(Will later on use SQL_SaveImgs to save all images)
-------------------------------------------
Hope someone please can help me!!
Regards,
Mr Isaksen
I store from 1 to 50 (depending on input from user) image names in session
variables (not array), and put them in variables like this:
For X = 1 To 50
Execute("varImage_" & X & " = Session(""image_" & X & """)")
Next`
This work perfect, output is like this:
varImage_1 = session("image_1")
varImage_2 = session("image_2")
varImage_3 = session("image_3") and so on...
---Here is what I try to do:--------------
Now I'm stucked with almost the same "problem"... I need to create ut to 50
SQL's in a loop like the other code.
This code under will explain what I try to do, X shall go from 1 to 50. I
just need to get this correct:
For X = 1 To 50
if varImage_X <> "" then SQL_X = "insert into tblImage (path,sort,artID)
values ('"&varImage_X&"','X','"&dbArtID&"'); "
'Make variable SQL_SaveImgs with all the SQL's:
if varImage_X <> "" then SQL_SaveImgs = SQL_SaveImgs & SQL_X
Next
How can I do this so it works??
-------------------------------------------
Try to get this output:
if varImage_1 <> "" then SQL_X = "insert into tblImage (path,sort,artID)
values ('"&varImage_1&"','1','"&dbArtID&"'); "
if varImage_2 <> "" then SQL_X = "insert into tblImage (path,sort,artID)
values ('"&varImage_2&"','2','"&dbArtID&"'); "
if varImage_3 <> "" then SQL_X = "insert into tblImage (path,sort,artID)
values ('"&varImage_3&"','3','"&dbArtID&"'); " and so on....
if varImage_1 <> "" then SQL_SaveImgs = SQL_SaveImgs & SQL_1
if varImage_2 <> "" then SQL_SaveImgs = SQL_SaveImgs & SQL_2
if varImage_3 <> "" then SQL_SaveImgs = SQL_SaveImgs & SQL_3 and so on....
(Will later on use SQL_SaveImgs to save all images)
-------------------------------------------
Hope someone please can help me!!
Regards,
Mr Isaksen