sql server - MS Access import image into table -


in ms access i'd able search image, or images, on system , save them ole fields in tables linked sql server.

having preview in form ideal well.

this seems simple task i've given after hours of searching. , i'm storing images varbinary(max) in sql database, no i don't want store link images.

after setting image field, attached button:

private sub commandopenpicture_click()      dim strfilter string      dim strinputfilename string       strfilter = ahtaddfilteritem(strfilter, "jpeg files (*.jpg, *.jpeg)", "*.jpg;*.jpeg")      strfilter = ahtaddfilteritem(strfilter, "bmp files (*.bmp)", "*.bmp")      strfilter = ahtaddfilteritem(strfilter, "all files (*.*)", "*.*")       strinputfilename = ahtcommonfileopensave( _                              filter:=strfilter, _                              openfile:=true, _                              dialogtitle:="choose image file...", _                              flags:=ahtofn_hidereadonly)       if len(strinputfilename) > 0          ' selected file         imgdampic.picture = strinputfilename         me.damsphoto.value = imgdampic.picture         file_path.value = strinputfilename                 'put sql insert statement or dao here        else          'no file chosen, or user canceled       end if end sub 

Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

python - malformed header from script index.py Bad header -