|
I said : combobox.selectedindex = -1 and not combobox.selectedindex -1 !
Try the above thing and it would work!
Regards,
Asim
|
|
|
|
|
Hi,
I need some help. How can I verify if an object has no instance.
I need to know if my object is nothing, to prevent the object null reference exception.
Thanks in advanced.
biglewy
|
|
|
|
|
try to use :
if not OBJECT is nothing then
// Code here...
end if
Regards,
Asim
|
|
|
|
|
Hai Guys,
i want to check the existance of a table in specific database.
now i am using it as
Dim Rs As ADODB.Recordset
Set Rs = New ADODB.Recordset
Rs.Open "Select * From Employee"
if the Table not Found it give me error
but i think there is another way of checking it so can any one help me...
Sasmi
|
|
|
|
|
Hi Sasmi
use the database in which u want to check the table
then write this query
select name from sysobjects where type='u' and name =<table name>
type ='u' means user table
this will help
abhinav
|
|
|
|
|
Hi all !
I am 2 oracle Server !
In Oracle A, I create a store procedure using dblink to Oracle B to query data.
I buil a application in VB.net. And connect to Oracle A anh use this Procedure but I allway the error:
"database Client not begin transaction"
Athought , I add transaction but this error still occur
Pls, help me, bug it !
Thank alot !
|
|
|
|
|
I'm trying to write a program out of a book called network programming in.net and currently on page 360 13.3.2 using packetX and winPCap
the language I am writing in would be Vb.net I have written this program once before and got help off this site but at that time the individual that helped me told me that perhaps this book was too advanced for me at the time and I agreed so I put it away for well not have went back through the book have gotten to this particular page number and this is the first error that I have run across because of my understanding of it where the first time I went through the book I was coming to this site with questions about every program I was writing out of this book anyway to move on I need help
I've written the code and I have no errors But the program does not work
-----------------------------------------------------------------------------
Option Strict Off
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
With lvPackets
.Columns.Add("From", .Width / 3, HorizontalAlignment.Left)
.Columns.Add("To", .Width / 3, HorizontalAlignment.Left)
.Columns.Add("Size", .Width / 3, HorizontalAlignment.Left)
.View = View.Details
End With
End Sub
Private Sub btnstart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnstart.Click
Me.AxPacketXCtrl1.Start()
End Sub
Private Sub axPacketXCrl1_onPacket(ByVal eventSender _
As System.Object, ByVal e As _
AxPacketXLib._IPktXPacketXCtrlEvents_OnPacketEvent) _
Handles AxPacketXCtrl1.OnPacket
Dim I As Short
Dim thispacket As String
Dim sourceip As String
Dim Destip As String
Dim item As New ListViewItem
thispacket = ""
For I = 0 To e.pPacket.DataSize - 1
thispacket = thispacket & Chr(e.pPacket.Data(I))
Next
If e.pPacket.Data(14) = 69 And e.pPacket.Data(23) = 6 Then
sourceip = e.pPacket.Data(26) & "." & _
e.pPacket.Data(27) & "." & + _
e.pPacket.Data(28) & "." & + _
e.pPacket.Data(29)
Destip = e.pPacket.Data(30) & "." & _
e.pPacket.Data(31) & "." & + _
e.pPacket.Data(32) & "." & + _
e.pPacket.Data(33)
item.SubItems(0).Text = sourceip
item.SubItems.Add(Destip)
item.SubItems.Add(e.pPacket.DataSize)
lvPackets.Items.Add(item)
End If
End Sub
End Class
-----------------------------------------------------------------------------
after the dim statements where the code looks like this me
thispacket = ""
For I = 0 To e.pPacket.DataSize - 1
thispacket = thispacket & Chr(e.pPacket.Data(I))
where it says chr(e.pPacket.Data(I))
in the book it is different it goes like this
thispacket = ""
For I = 0 To e.pPacket.DataSize - 1
thispacket = thispacket & Chr(eventArgs.pPacket.Data(I))
and does not work I can not remember who person was that helped me from this site but there was something else I added a reference and do we changed in the eventArgs. To what is now in the code I think I hope this isn't more confusing than it is helpful I will stop for now until I have a question or if I get a question
-- modified at 22:08 Thursday 8th December, 2005
|
|
|
|
|
Hi, everyone, thanks for viewing my post. I have a custom combobox that allows the user to type within the list and filter the options as the user types letters, and the combobox also allows the user to select a value from the list. The issue I am having is that I need to be able to either return -1 for the selected index if the user types a value that does not exist in the list, or return the selected value if the user selects a value from the list.
Code:
Private comb_companyName_SelectedIndexTextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles comb_companyName.SelectedIndexChanged, comb_companyName.TextChanged
Call Me.ucIMediator.addressCheckStatus()
If Me.comb_companyName.SelectedIndex >= 0 Then
Me.tcmediator.p_cId = Me.comb_companyName.SelectedValue
Else
Me.tcmediator.p_cId = Me.comb_companyName.SelectedIndex
End If
Me.lbl_companyInfoStatus.Text = Me.tcmediator.p_cId
Call Me.enableUserControls(False)
End Sub
The problem with this function is that it fires the two events everytime the index and text are changed. (Meaning I am calling the addressCheckStatus function twice, everytime the user selects one item from the list or types one character into the text area). Does anyone have any idea on how I can control this so that the event will only fire once. Thank you.
eatwork
|
|
|
|
|
Hard to tell. If I had to guess, I would say that the code that filters the user input (e.g. as the user types letters) changes the index, and then after it decides which item should be selected, it changes the index again. That is just a guess of course. I think you should look for something changing the index when you don't expect it to.
Hope that helps. Kind of hard to give better advice without seeing the code.
Roy.
|
|
|
|
|
Hi!
Am new in VB.net and would like to know how to start a project with it.
I've done Microsoft Access Programming .
What i dont understand in VB.net is where the table or file is?
Or how is it connected to other databases for the data to be saved in a table?
Could some one give me a sample ziped programme .
Thanks in advance.
Regards
Joseph.
Joseph
|
|
|
|
|
Jkkenzie wrote: I've done Microsoft Access Programming .
Ah - that's why you're expecting to see a lot of stuff that isn't there by default.
Jkkenzie wrote: What i dont understand in VB.net is where the table or file is?
There is no table. Unless you create one. It's called a Datagrid control, you need to drag it onto your form. Remember, there are plenty of apps in the world that don't have a table on them.
Same goes for files, if you want to read a file, you need to create the storage for the data in your app ( for example, an array of strings, or a Bitmap object, see how it's not provided because it can change ? ), and provide the way to get the data to and from a file on the HDD.
Jkkenzie wrote: Or how is it connected to other databases for the data to be saved in a table?
You connect to databases using ADO.NET objects.
Jkkenzie wrote: Could some one give me a sample ziped programme .
Look around you. If the Code Project VB.NET section doesn't have what you want, try google, and find some resources on a VB.NET specific site.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
OK. Thanks and i'll try what you've said.
Regards
Joseph
ffffffffffffffffffff
|
|
|
|
|
With all the assumptions you're carrying over from Access, it sounds like you need to start from scratch. Forget nearly everything you know about VB and start with this[^] friendly recommendation.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm using the CrystalReportViewer to view my Crystal report. At runtime the DataBase Login screen keeps coming up. How can I turn this feature off or supply it with the needed information ahead of time.
Also, I created a DataSet inside my project to hold the data for the report. My report textboxes are connected to the fields in the DataSet. But when the report runs it does not display the data. The data is in the DataSet but why doesn't the report display it?
|
|
|
|
|
Hi All,
I am using subreports in my crystal reports in the main report's age header section.
The problem is I just adjusted the page header in the crystal reports and now I DON"T SEE MY DATA. I could see the data earlier. I can see the the data of the sub reports seperately but not when I want to preview it as a whole. If I check the "Show SQL query", it return the row but I cant see the data on the screen. Something goofy!!
Any ideas what went wrong?
Thanks for your help!
|
|
|
|
|
I made an application with opengl and an application in VB.net and i want to make a dll to call from the VB app the opengl app and change his parameters from there..I know nothing about dlls does anyone can help me giving some steps?I try to make it in VB class library but i can't find how to call my opengl project,and how to change his parameters
I am new in programming!
Thank you...
giotis
|
|
|
|
|
giotis82 wrote: I am new in programming!
Sounds like you're biting off too much at once.
I presume the opengl app is in C++ ? If so, your basic problem is, your OpenGL program wants to be an app, not a dll, so that it has a message pump, a window, etc. Then, your VB app is not going to be able to consume this application. The way to talk between VB.NET and C++ is probably C++/CLI. The way to do it from VB6 -> C++ is COM. COM works for VB.NET as well. But if you want a VB app and an OpenGL app, then you don't want a dll, because you're looking for two applications, and not an application that consumes a class library. In this case, WM_COPYDATA is the easiest way to send data between two applications ( google it ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for ur reply,yes the opengl app is in C++ and i use glui libraries!I have 2 more questions, with WM_COPYDATA can i pass parameters in my opengl app, and change my variables values?
And the other question is that i try to copy my opengl code with his libraries to a "class library" app but there no response it stuck in all opengl libraries (glut,glu,glui, etc.). Is there any way to remake my opengl program as dll?
Thanks for ur response!
giotis
|
|
|
|
|
giotis82 wrote: WM_COPYDATA can i pass parameters in my opengl app, and change my variables values?
Yes, and no. WM_COPYDATA is a message you send and recieve. You need to write code on both ends, to send the data, and to parse and use it on the other end. So yes, you can send values to the other application, and use them to set variables. But no, you can't send a message and have it change values without you writing the code to recieve the message on the other end.
giotis82 wrote: Is there any way to remake my opengl program as dll?
Like I said, if it's a dll, then it's NOT a program, it does not have a window, nor can it be run by itself.
I think you should instead use DirectX in VB.NET, if that's an option.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks one more time for ur reply!That's mean that i must stop trying create a dll!Well i try to find an example using WM_COPYDATA but i didn't find something that could help me...Can u send me a simply code to understand it?That will be very helpful for me, as u already know the opengl window created in the "main" function so how it will be my WM_COPYDATA? As i think of what u said i must have a "send" and "receive" to each program.
If u have a moment please send me a simply code in my mail "giotis82@mycosmos.gr" or just type it over here!!
Thanks u very much for ur time!!
giotis
|
|
|
|
|
|
Well i call my opengl exe with "CWinApp: Shell("ExePath")" it work properly!
As i thought the steps will be:
1. the opengl with the Sendmessage will send his variables
2. the VB will receive them
3. the VB will send the new values
4. the opengl will receive them and change each one
Am i right?
One more question:I have to do my variables global and place the WM_COPYDATA at the end of the main function?
Thanks for ur time, u r very helpfull..........
giotis
|
|
|
|
|
I have to mention that my problem is that: if the "VB.NET" user press a button it will appear my opengl form and with a properties menu the user can change some of the grafic sizes.
giotis
|
|
|
|
|
do you want dll to be created in vb.net?
if yes then while selecting new project go for class library
write ur function there, and save it then built it.it will create dll file inside bin directory of ur project folder.
try to be the best... whereever you go,
|
|
|
|
|
Hi All,
Hope someone can help me on this I have written an insert command in VB for a connection to a MySQL database here is the code -
cmdSelect = cnn.CreateCommand
cmdSelect.CommandText = "SELECT Transaction_No, User_ID, Expiry_Date, " & _
"Expiry_Date_Hex, Product_ID, Update_Date, Key_Serial_No, Developer_ID, " & _
"Locking_Code, Unlock_Code FROM KeyIssueDetails"
mda.SelectCommand = cmdSelect
cmdInsert = cnn.CreateCommand
cmdInsert.CommandText = "INSERT INTO KeyIssueDetails(Transaction_No, User_ID, Expiry_Date, Expiry_Date_Hex, Product_ID, Update_Date, Key_Serial_No, Developer_ID, Locking_Code, Unlock_Code) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Transaction_No", Microsoft.Data.Odbc.OdbcType.Int, 0, "Transaction_No"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("User_ID", Microsoft.Data.Odbc.OdbcType.VarChar, 50, "User_ID"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Expiry_Date", Microsoft.Data.Odbc.OdbcType.DateTime, 0, "Expiry_Date"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Expiry_Date_Hex", Microsoft.Data.Odbc.OdbcType.VarChar, 50, "Expiry_Date_Hex"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Product_ID", Microsoft.Data.Odbc.OdbcType.VarChar, 50, "Product_ID"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Update_Date", Microsoft.Data.Odbc.OdbcType.DateTime, 0, "Update_Date"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Key_Serial_No", Microsoft.Data.Odbc.OdbcType.VarChar, 50, "Key_Serial_No"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Developer_ID", Microsoft.Data.Odbc.OdbcType.VarChar, 50, "Developer_ID"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Locking_Code", Microsoft.Data.Odbc.OdbcType.VarChar, 50, "Locking_Code"))
prm = cmdInsert.Parameters.Add(New Microsoft.Data.Odbc.OdbcParameter("Unlock_Code", Microsoft.Data.Odbc.OdbcType.VarChar, 50, "Unlock_Code"))
'
mda.InsertCommand = cmdInsert
prm.SourceVersion = DataRowVersion.Original
prm.Direction = ParameterDirection.Output
mda.Fill(mds, "KeyIssueDetails")
DGMain.DataSource = mds
DGMain.DataMember = "KeyIssueDetails"
My Problem is that the command works fine bar the last parameter. "Unlock_Code" comes back as NULL even though the dataset accepts the data I enter. I am fairly new to this so I may just be missing something obvious but any help would be great I can't figure out where I went wrong.
|
|
|
|
|