|
My Project has a requirement of storing Image and Text data in Access Database. I am using Vb.net for coding.
According to me, This requirement can be fullfilled using binary files. But i am not able to figure out how to do it.
The requiremnt is to accept data in RichTextBox(Text and Images) and convert it to binary file and store it to DB(Access). and Vice Versa.
Can any body help me regarding this...
Any links berifing the matter or any article
Plz i need help...
Jats
|
|
|
|
|
hey, I am C# developper, but i think my code might be useful since we are both using .NET framework.
do the following.
Check if file exist first by using the File class.if exists then do this
byte[] Imagespace = File.ReadAllBytes(strPath);
strpath is the full path of the photo.
you can then send to stored procedure or do whatever you want once you have the photo in Imagespace variable.
I wish my code would be useful.
I've been programming since year 1999, graduated from Univeristy Paris 2 France, fluent in C,C++,VC++,Web programming (XML,HTML,php etc..),.NET frameworks,C# and ASP.NET,SQL server, Mastering VC++ .NET and SQL server,data structure and database design
|
|
|
|
|
Thanks rabih_kai for sharing this information.
|
|
|
|
|
Hi thankx for the help rabih.
Any how i have fullfilled the reqirement in a different and simple way. As the data is inserted in RichTextBox i accessed the data in RTF format from RTBox and stored in database. And while retrieving i can assign the data to RTBox.Rtf. It will convert the Text and Images and will display them.
Simple isnt it...
Jats
|
|
|
|
|
Hello
How can I make the IDE show tool tips for the properties of my own objects? I know it can be done but am not sure where to look.
Many Thanks
-- modified at 8:49 Tuesday 22nd August, 2006
The FOZ
|
|
|
|
|
Take a tool tip component and place it on the form.
Go to Mouseover event of ur object and add this text...
ToolTip1.setToolTip(ObjectName(EX:Button1),"ToolTipText"(Ex:"New"))
Jats
|
|
|
|
|
Thanks for the reply, but its not quite what I'm after, I may have phrased the question wrong.
The kind of tool tips I am after are when I am using my object in code and the intellisense pops up. When I select a particular property for my object I would like some text to appear detialing what the property does. Like when you are using a text box and you type TextBox1.Text and a tool tip pops up telling meabout the Text property.
Many Thanks
The FOZ
|
|
|
|
|
hi everyone,
i have created a hashtable that will create 5 random and unique numbers, and have copied it to an array. i now need to retrieve the stored values from the array to individual labels (label1.Text, labe12.text). your help is appreciated.
here is my code:
Dim hash As New Hashtable
Dim RandNum As Integer
Dim targetArray() As DictionaryEntry
For I As Integer = 1 To 5
Do
RandNum = Convert.ToInt32(Rnd() * 15)
Loop While hash.Contains(RandNum)
hash.Add(RandNum, Nothing)
Next
ReDim targetArray(hash.Count - 1)
hash.CopyTo(targetArray, 0)
label.text = targetArray(1) 'i am getting an error stating i cannot
'convert a dictionary entry to string.
Julian
"New to programming and I am hooked"
|
|
|
|
|
You can get an array of the keys or values by hash.Keys and ( I think ) hash.Values.
As you're using .NET 1.1, you need to call ToString, as the contents of your hashtable is an object.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I have the syntax error in update statement but i not sure where did i code wrong....anyone can help?
DB.Execute "update DONO set NO=" & "'" & dono.Text & "'" & _
",Date= " & "'" & ddate.Text & "'" & _
",Customer=" & "'" & Combo1.Text & "'" & _
",Description =" & "'" & ddes.Text & "'" & _
",Total =" & "'" & temptotal.Caption & "'" & _
",BillTerm=" & "'" & dterm.Text & "'" & _
" where [dono] = " & "'" & userin & "'"
|
|
|
|
|
do not put numeric values in ' '
|
|
|
|
|
all my value was in text...
even the date i try to use without ' ' but still the error exict...
-- modified at 4:42 Tuesday 22nd August, 2006
|
|
|
|
|
Check the data type of the columns in the database and do accordingly
Navi
|
|
|
|
|
i had found my error which is the DATE cause the problem...
anyway to update my DATE field??
not sure wats wrong with it, is it the format or data type problem? in my database it's in DATE.
Date= " & "'" & ddate.Text & "'" & _
|
|
|
|
|
|
I was tring to update the Total amount of the specific bill which user may want to add more item in future.
But when i run my function the value always update the record to my first data ..?? any mistake i have make???
HERE is my coding :
'Userin is the value user enter for the bill no.
If answer = vbYes Then
rs.Edit
DB.Execute "update DOno set Total =" & "'" & temptotal.Caption & "'" & _
" where [dono] = " & "'" & userin & "'"
rs.Fields("Total") = temptotal.Caption
rs.Update
rs.MoveFirst
MsgBox ("Total updated")
|
|
|
|
|
remove db.execute statement
Navin
|
|
|
|
|
i think cannot remove cause it will have compile error
|
|
|
|
|
go forward remove DB.Execute statement
DB.Execute "update DOno set Total =" & "'" & temptotal.Caption & "'" & _
" where [dono] = " & "'" & userin & "'"
Navi
-- modified at 6:01 Tuesday 22nd August, 2006
|
|
|
|
|
after remove nothing was update... if dont use the SQL how the vb know which bill I going to update?
|
|
|
|
|
Actually i want to call oracle function which returns boolean value, from vb.net .
I have one function in oracle which return boolean value..0 or 1.
this function is for adding user to table.
i dont have right to access direct table..so i 've to use add_user(Userid,SoftwareId,Role) function for adding a user from vb.net using Oracleclient.
can anybody help me ..?
Thanks
Hemaxi
|
|
|
|
|
The same way as any other database, just use the specific provider classes for Oracle.
You get a connection to oracle (OracleConnection?). You create a command (OracleCommand) and you give it the details of the SQL you want to run and any parameters and the connection you opened earlier. Then you call ExecuteScalar() to get your value back.
|
|
|
|
|
it gives me an error that wrong type of arguments.
If you can help me on this ..will paste my code. and the function from oracle.
Thanks..
hemaxi
|
|
|
|
|
hemrk wrote: it gives me an error that wrong type of arguments.
What is the "wrong type of arguments"?
|
|
|
|
|
check the datatype of the arguments which ur passing.
Navin
|
|
|
|