|
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
|
|
|
|
|
Hey
I think som that datatype is the problematic as my stored procedure returns Boolean Datatype.
and cmd.parameters.add ("",Oracledatatype....doesnt have boolean type.
I m using oracleclient . So , Probably it doesnt support Boolean data type.
Below is my stored procedure parameters..
PROCEDURE Add_User_Role
( UserID IN NUMBER
, SoftwareID IN NUMBER
, RoleNo IN NUMBER
, ReturnValue OUT BOOLEAN);
my vb code is like this...
With cmdUserRoleFunc
.Transaction = myTrans
.Connection = cnContract
.CommandType = CommandType.StoredProcedure
.CommandText = "Add_User_Role"
End With
Dim paramReturnValue As New OracleParameter()
paramReturnValue.ParameterName = "@return_value"
paramReturnValue.OracleType = OracleType.Int32 ' here want to use boolean but doesnt have in enumeration.
paramReturnValue.Direction = ParameterDirection.Output
Dim paramUserId As New OracleParameter()
paramUserId.ParameterName = "@UserId"
paramUserId.OracleType = OracleType.Int32
paramUserId.Direction = ParameterDirection.Input
paramUserId.Value = UserId
Dim paramSftwrId As New OracleParameter()
paramSftwrId.ParameterName = "@SoftwareId"
paramSftwrId.OracleType = OracleType.Int32
paramSftwrId.Direction = ParameterDirection.Input
paramSftwrId.Value = 42
Dim paramRoleNo As New OracleParameter()
paramRoleNo.ParameterName = "@RoleNo"
paramRoleNo.OracleType = OracleType.Int32
paramRoleNo.Direction = ParameterDirection.Input
paramRoleNo.Value = RoleNo
'cmdUserRoleFunc.Parameters.Add(paramReturnValue)
cmdUserRoleFunc.Parameters.Add(paramUserId)
cmdUserRoleFunc.Parameters.Add(paramSftwrId)
cmdUserRoleFunc.Parameters.Add(paramRoleNo)
cmdUserRoleFunc.Parameters.Add(paramReturnValue)
cnContract.Open()
cmdUserRoleFunc.ExecuteScalar() 'Gives me error here..that illegal variable
Pls. Help me..i just wanted to get rid of this problem
Thanks anyways,
Hemxi
|
|
|
|
|
Hey
I think som that datatype is the problematic as my stored procedure returns Boolean Datatype.
and cmd.parameters.add ("",Oracledatatype....doesnt have boolean type.
I m using oracleclient . So , Probably it doesnt support Boolean data type.
Below is my stored procedure parameters..
PROCEDURE Add_User_Role
( UserID IN NUMBER
, SoftwareID IN NUMBER
, RoleNo IN NUMBER
, ReturnValue OUT BOOLEAN);
my vb code is like this...
With cmdUserRoleFunc
.Transaction = myTrans
.Connection = cnContract
.CommandType = CommandType.StoredProcedure
.CommandText = "Add_User_Role"
End With
Dim paramReturnValue As New OracleParameter()
paramReturnValue.ParameterName = "@return_value"
paramReturnValue.OracleType = OracleType.Int32 ' here want to use boolean but doesnt have in enumeration.
paramReturnValue.Direction = ParameterDirection.Output
Dim paramUserId As New OracleParameter()
paramUserId.ParameterName = "@UserId"
paramUserId.OracleType = OracleType.Int32
paramUserId.Direction = ParameterDirection.Input
paramUserId.Value = UserId
Dim paramSftwrId As New OracleParameter()
paramSftwrId.ParameterName = "@SoftwareId"
paramSftwrId.OracleType = OracleType.Int32
paramSftwrId.Direction = ParameterDirection.Input
paramSftwrId.Value = 42
Dim paramRoleNo As New OracleParameter()
paramRoleNo.ParameterName = "@RoleNo"
paramRoleNo.OracleType = OracleType.Int32
paramRoleNo.Direction = ParameterDirection.Input
paramRoleNo.Value = RoleNo
'cmdUserRoleFunc.Parameters.Add(paramReturnValue)
cmdUserRoleFunc.Parameters.Add(paramUserId)
cmdUserRoleFunc.Parameters.Add(paramSftwrId)
cmdUserRoleFunc.Parameters.Add(paramRoleNo)
cmdUserRoleFunc.Parameters.Add(paramReturnValue)
cnContract.Open()
cmdUserRoleFunc.ExecuteScalar() 'Gives me error here..that illegal variable
Pls. Help me..i just wanted to get rid of this problem
Thanks anyways,
hemaxi
|
|
|
|