|
-
Jan 12th, 2003, 10:41 PM
#1
Thread Starter
New Member
-
Jan 13th, 2003, 07:02 PM
#2
PowerPoster
I don't think there is any way that you can create an array within an ACCESS db. I think what you are doing is how it has to be done.
-
Jan 14th, 2003, 09:05 AM
#3
Well, there is a kludge to do this.
First, let it be said that having "repeating items" (the equivalent of an array) is a "no-no" in relational database design, but that's another issue.
To do what you want to do, you can use part of the name of the database field as the array "index" - so the fact that you have "Hobby1", "Hobby2", etc. as your field names will help you here.
Furthermore, in standard VB (not .NET), you have control arrays, so you can rename your textboxes simply "txtHobby", and assign Index values of 1 to 12 respectively.
Assuming the above is in place, here's some code you can use:
VB Code:
Dim intX As Integer
With rsUpdFamily
For intX = 1 To 12
[b].Fields("hobby" & intX)[/b] = frmFamily!txtHobby[b](intX)[/b].Text
Next
rsUpdFamily.Update
End With
Have fun ...
"It's cold gin time again ..."
Check out my website here.
-
Jan 20th, 2003, 09:49 PM
#4
Thread Starter
New Member
THANKS A bundle
BRUCEG
thanks a bundle... your solution is what i've been looking for..
now my coding is a bit short and readable. glad that i ask it here...
adding to that i have a nother questions that i did post in here early on but no one seems to know how to do it... i thought i ask you instead... just follow the link to my earlier post in this forums..
HOW TO PUT PICTURE IN OUR VB PROJECT.
thanks.. any help is much appreciated..
thanks..
Arghhh... runtime error!! 
-
Feb 19th, 2003, 01:23 PM
#5
Member
Hi Kumar,
i have a view of your various questions:
answer to Question 1 : [picture in database]
For SQL you can use Textcopy.exe + ntwdblib.dll
or
For access you can use OLE Automation (use embed)
answer to Question 2 : [datatype]
use "OLE Object" for msaccess and "image" for sql
well, got to go... will write to you soon..
can always contact me at [email protected]
"please mention FROM VBFORUMS in the subject"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|