|
--> i want to store an image in a database not by saving its path as string but an image as image... How will i do this using vb.net..?
J A Nasir K
|
|
|
|
|
Hii
If you are using Access data base create a field for store image data type is OleObject. and Convert image in Binary format and try to save in data base.
May this solve your problem
Thanx
~Khatri Mitesh
|
|
|
|
|
first change the image into byte array as following
Public Function imageToByteArray(ByVal ImageIn As System.Drawing.Image) As Byte()<br />
Dim ms As MemoryStream = New MemoryStream()<br />
ImageIn.Save(ms, Imaging.ImageFormat.Bmp)<br />
Return ms.ToArray()<br />
End Function
and store this binary data into data
and for convert byte array to image use following
Public Function ByteArrayToimage(ByVal ImageArray As Byte()) As Image<br />
Dim ms As MemoryStream = New MemoryStream(ImageArray)<br />
Dim ReturnImage As Image = Image.FromStream(ms)<br />
Return ReturnImage<br />
End Function
hope this helps
|
|
|
|
|
Thank you so much. your solution is useful
|
|
|
|
|
i need a video streaming code written in VB.NET applicable on pocket pc.
|
|
|
|
|
..or someone to do your work for you. Write your code, then when it fails, post it for help.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi all,
i have develeped a large application in vb6 some years ago and it is runnig perfectly.
now i want to install this application on a machine having Vista.But i could not install it.
Kindly Suggest me the solution.
thanks
rmshah
Developer
modified on Monday, July 14, 2008 4:56 AM
|
|
|
|
|
Firstly you said it well
Years ago.
My Friend this is Year 2008, and Microsoft dont recomend Developers to initiate Development on vb6 and Continue enhancing vb6 aplication because vb6 is Dead , microsoft dont Support it anymore. Most of the People posting questions here , they ask us how to convert those vb6 applications to .NET, thats when we come in, but first you need to show us how far have you gone before we can help you, remember we cannot do your job , you have to do it and get Stuck and we will help you. Look Windows 98 and Look at Vista , are they the Same? No , if so now you have to start writting code that will be Compatable with Vista , is eaither you buy a Book on C#.NET or VB.NET.
Am Sorry vb6 is Doomed.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswa Maseko wrote: Am Sorry vb6 is Doomed.
Doomed - nah dead, buried, rotting corpse with white gooey things crawling through it.
I am continually astonished at the number of VB6 questions raised in this forum. I can understand support needs but some of them are development questions!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
well it is burried and Dead
Thank
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
hi Vuyiswa Maseko,
Thanks a lot for replying, here i would like to share my new experience that i have done.
i installed VB6 on a machine having Vista and upgraded it with service pack 6 of VB6, placed all codes of my application on it and compile it and make a package which installed successfylly on a second machine having vista.now my application compatible to vista and working perfectly.
Thanks
rmshah
Developer
|
|
|
|
|
hi r_mohd
Thats nice, but still remember you need to rewrite you vb6 app to .net.
Am glad you got a Solution.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi all...
I am trying to write to a mapped network drive. Firstly creating Directories and then writing to them. The creation process fails and gives me System.IO.DirectoryNotFoundException. I'm thinking that it doesn't pick up the drive but I have no idea what to check except for sucurity settings (which seem fine). If anybody has done this before help would be appreaciated...
Tx
Steve
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
I found the pkroblem. Here is the thing. The app doesn't see drives that are mapped unless it mapped the drives itself...
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
If your app is run by a user logged in at the machine, it will inherit the users operating environment, including all mapped drives.
If your app is running as a service, it will NOT get any of the mapped drives that the user sees.
|
|
|
|
|
be careful using mapped drives - they may not exist on another users machine or they may be mapped to another drive letter.
I always use UNC paths for mapped drives (//machinename/folder/). This does not help if the user does not have access to the drive but gets over the different mapping.
<br />
WshNetwork = CreateObject("WScript.Network")<br />
oDrives = WshNetwork.EnumNetworkDrives<br />
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hello,
i want to give VISTA look to my window application form...(FOR attractive Look only)
is it possible ??? i am using VB.Net 2.0 ???
can i need some plugins for that ???
how can i make my user interface attractive ???
help
thankx in advance
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
|
Run it on Vista
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi all,
I have an application will store some data into csv file which using the code below:
Dim Logger_FileName As String
Dim ReportPath as string
Dim sReportHeader As String
Dim CheckPath
Dim iFileNumTrend As Integer
'create folder
Logger_FileName = "test.csv"<br />
CheckPath = Dir(ReportPath & Logger_FileName, vbDirectory)<br />
If CheckPath = "" Then
'print heading at .csv file
iFileNumTrend = FreeFile<br />
Open ReportPath & Logger_FileName For Append As #iFileNumTrend<br />
sReportHeader = "Date" & ", " & "Time"<br />
Print #iFileNumTrend, sReportHeader<br />
Close #iFileNumTrend<br />
End If
:
:
:
'store the latest data
iFileNumbertrend = FreeFile ' Get the free file number.<br />
Open ReportPath & Logger_FileName For Append As #iFileNumbertrend<br />
Print #iFileNumbertrend, sRecordString<br />
Close #iFileNumbertrend
my coding only allow me to store data in 1 sheets with limit 65536 rows. My question is how can i create an another sheet to keep storing the data when over the limit(65536 rows)?
any tips are welcome
thanks in advance
regards
cocoonwls
|
|
|
|
|
CSV stands for Comma Seperated Values. It is mearly a text file and is not a native file format for Excel. Hence, you have no methods of controlling how Excel imports the file by putting something in the file.
You've run into a limitation of Excel, not of the file itself.
Excel is not a database, though it appears you're using it as such. I would suggest using something else to store the data and do your reporting, such as Access or SQL Server Express.
|
|
|
|
|
I'm trying to monitor file access and when another program accesses a file being monitored make changes to the file from my monitor program and then allow the accessing program access to the file. Does anyone know how to block the accessing program temporarily while my monitor program makes changes to the file?
Regards
|
|
|
|
|
The only thing you can do is open the file with ShareDenyAll sharing permissions. This will give you sole access to the file so no other process can open it. BUT, if you cannot open the file like this, it means the file is already open by another process and you have no methods of blocking file access at all until the file is closed by the other app.
|
|
|
|
|
Hello Dave,
Thank you for your reply. One last question. If I write a file monitor program will I receive control of the file befor the other process?
Regards
|
|
|
|
|
Just because you're calling your app a "monitor" doesn't give it any special privileges, so no. Your app get's access to the file like any other, on a first come, first served basis.
|
|
|
|