|
That's great news. Why are you telling us this ? Did you have a specific problem ? You should tell us what it is, and post some code so we can help.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
above i modified my question in proper way.
My main problem is i am creating multiple drop downs using class for each dropdown.i created one drop down but i can not able to create multiple.
Getting error called base class have multiple definetions. code i am trying for drope down is:
Imports System.ComponentModel
Public Class MotoList1 : Inherits System.ComponentModel.StringConverter
'''
'''
Private _Title As String
Private _Show As Boolean
Private _Number As Short
'''
<CategoryAttribute("Other Inputs"), _
Browsable(True), _
[ReadOnly](False), _
BindableAttribute(False), _
DefaultValueAttribute(""), _
DesignOnly(False), _
DescriptionAttribute("Enter Title for the application")> _
Public Property Title() As String
Get
Return _Title
End Get
Set(ByVal Value As String)
_Title = Value
End Set
End Property
'''
<CategoryAttribute("Other Inputs"), _
Browsable(True), _
[ReadOnly](False), _
BindableAttribute(False), _
DefaultValueAttribute("True"), _
DesignOnly(False), _
DescriptionAttribute("Show option")> _
Public Property Show() As Boolean
Get
Return _Show
End Get
Set(ByVal Value As Boolean)
_Show = Value
End Set
End Property
'''
<CategoryAttribute("Other Inputs"), _
Browsable(True), _
[ReadOnly](False), _
BindableAttribute(False), _
DefaultValueAttribute("0"), _
DesignOnly(False), _
DescriptionAttribute("Enter a number")> _
Public Property Number() As Short
Get
Return _Number
End Get
Set(ByVal Value As Short)
_Number = Value
End Set
End Property
Dim _Motor1in As String() = New String() {"400", "500"}
Public Overloads Overrides Function GetStandardValues(ByVal context As System.ComponentModel.ITypeDescriptorContext) As System.ComponentModel.TypeConverter.StandardValuesCollection
Return New StandardValuesCollection(_Motor1in)
End Function
'''
Public Overloads Overrides Function GetStandardValuesSupported(ByVal context As System.ComponentModel.ITypeDescriptorContext) As Boolean
Return True
End Function
'''
Public Overloads Overrides Function GetStandardValuesExclusive(ByVal context As System.ComponentModel.ITypeDescriptorContext) As Boolean
Return True
End Function
'''
End Class
here while am trying to create another drop down --GetStandardValues-- i got error as function can not be over ride
that is the my problem
|
|
|
|
|
i have written this code for adding the values in to the database
i m using vb6 and Microsoft Access
i m gettin an error " SYNTAX ERROR IN INSERT INTO STATEMENT "
PLS HELP ME...
Private Sub Command1_Click()
Dim db As New ADODB.Connection
Set db = New ADODB.Connection
Dim adoRecordset As ADODB.Recordset
Set adoRecordset = New ADODB.Recordset
Dim sSQL As String
Dim name As String
Dim number As String
Dim qualification As String
Dim experience As String
Dim phone_no As String
Dim dealer As String
name = Text1.Text
number = Text2.Text
qualification = Text3.Text
experience = Text4.Text
phone_no = Text5.Text
dealer = Text6.Text
sSQL = "INSERT INTO datatable (Name, Number, Qualification, Experience, Phone_No, New_Dealer) values('name','number', 'qualification', 'experience', 'phone_no', 'dealer')"
db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\helpdesk-ngp\My Documents\sp\dataend.mdb;Persist Security Info=False"
adoRecordset.Open sSQL, db, adOpenDynamic, adLockOptimistic
adoRecordset.Close
End Sub
spruhas
|
|
|
|
|
instead of this
sSQL = "INSERT INTO datatable (Name, Number, Qualification, Experience, Phone_No, New_Dealer) values('name','number', 'qualification', 'experience', 'phone_no', 'dealer')"
you will have to construct a string like this
sSQL = "INSERT INTO datatable (Name, Number, Qualification, Experience, Phone_No, New_Dealer) values('" & name & "','" & qualification .....etc
as name,qualification are variables
cheers
TheMrProgrammer
|
|
|
|
|
i m still getting the same error
at this line
adoRecordset.Open sSQL, db, adOpenDynamic, adLockOptimistic
purvas
|
|
|
|
|
It's obvious you have no idea what you're doing. I therefore assume you're new to VB6. VB6 is unsupported, and was always garbage. Abandon it if you can, and learn a real language, or, at least, VB.NET.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Change your SQL Statement like this
sSQL = "INSERET INTO datatable (Name, Number, Qualification, Experience, Phone_No, New_Dealer) VALUES ('" & Name & "','" & Number & "','" & qualification & "','" & experience & "','" & phone_no & "','" & dealer & "'"
|
|
|
|
|
i have changed but still get the same error at this line
adoRecordset.Open sSQL, db, adOpenDynamic, adLockOptimistic
purvas
|
|
|
|
|
NAME and NUMBER are reserved keywords in Microsoft Access and you should avoid using them as column names. The best solution is to rename the columns in your table to something like DEALER_NAME and DEALER_NO. If you can't rename the columns, then you can change your insert statement to
INSERT INTO datatable ([Name], [Number], Qualification... etc. But that is a workaround, not a real fix. Much better in the long run to fix it properly.
|
|
|
|
|
THANK YOU EVERY BODY
THE PROBLEM IS SOLVED
purvas
|
|
|
|
|
Hello,
I would like to know how to work with OpenGL with Visual Basic .Net.
Thanks
|
|
|
|
|
|
how I can use with cluse in sql 2005?
bah10z
bah10z
|
|
|
|
|
We have a SQL forum. You can also look here[^]
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
clouse = cluse = clause??
how the hell did you figure that out??
More complicated then the daily CCC.
|
|
|
|
|
EliottA wrote: More complicated then the daily CCC.
Thanks, I work hard at them, his seem to come easy!
------------------------------------
"When Belly Full, Chin Hit Chest"
Confucius 502BC
|
|
|
|
|
|
Hi,
I am trying to make a client server form application using VB2005. I am using VS2005 Professional for development.
The problem is as follows:
When more than one client tries to connect to the server. The connection is refused and the Client gets an exception in Connect() method - Target machine actively refused the connection.
This problem occurs only when 2 or more clients try to simultaneously connect to the server. For a single client accessing at a time the problem does not occur.
The code segment is as given below:
-----------1 Module
Imports System.Net.Sockets
Imports System.Net
Public Class FrmMdiParent
Dim WithEvents wsServer As New Winsock2005DLL.Winsock
Private Sub FrmMdiParent_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If wsServer.State = Winsock2005DLL.WinsockStates.Connected Then wsServer.Close()
End Sub
Private Sub FrmMdiParent_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
main()
Try
wsServer.MaxPendingConnections = 20
wsServer.LocalPort = 8000
wsServer.Listen()
Catch ex As Exception
MessageBox.Show(ex.Message, "Exceptions Handler!", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Private Sub wsServer_ConnectionRequest(ByVal sender As Object, ByVal e As Winsock2005DLL.WinsockClientReceivedEventArgs) Handles wsServer.ConnectionRequest
If wsServer.State = Winsock2005DLL.WinsockStates.Connected Then
MessageBox.Show("Server is busy with other clients.", "Server connection failed!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End If
wsServer.Accept(e.Client)
End Sub
Private Sub wsServer_DataArrival(ByVal sender As Object, ByVal e As Winsock2005DLL.WinsockDataArrivalEventArgs) Handles wsServer.DataArrival
Try
Dim str As String = ""
wsServer.Get(str)
.........(other statements)
End Select
Catch ex As Exception
MessageBox.Show(ex.Message, "Exceptions handler!", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Private Sub wsServer_Disconnected(ByVal sender As Object, ByVal e As System.EventArgs) Handles wsServer.Disconnected
wsServer.Listen()
End Sub
Private Sub mnuItmLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuItmLogin.Click
Select Case mnuItmLogin.Tag
Case 0
' Login
Dim objfrmlogin As New FrmLogin
objfrmlogin.ShowDialog()
Case 1
' Logout
mnuSvrAuth.Enabled = False
mnuItmLogin.Tag = 0
mnuItmLogin.Text = "&Login"
End Select
End Sub
End Class
----------------2 Module
Dim WithEvents winSock1 As New Winsock2005DLL.Winsock
#Region " WinSock events "
#Region " Connected "
Private Sub winSock1_Connected(ByVal sender As Object, ByVal e As System.EventArgs) Handles winSock1.Connected
If isRequest Then
.................
End Sub
#End Region
#Region " Data Arrival "
Private Sub winSock1_DataArrival1(ByVal sender As Object, ByVal e As Winsock2005DLL.WinsockDataArrivalEventArgs) Handles winSock1.DataArrival
Dim str As String = ""
winSock1.Get(str)
.................
End Sub
#End Region
#Region " Error Occured "
Private Sub winSock1_ErrorReceived(ByVal sender As Object, ByVal e As Winsock2005DLL.WinsockErrorEventArgs) Handles winSock1.ErrorReceived
MessageBox.Show(e.Message, "Error Occured from server.", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Sub
#End Region
-----------------
The above exception is thrown when more than 1 clients try to access the server simultaneously.
I am not able to find any solution to this problem, any help will be really useful.
Thanks
-Dev
|
|
|
|
|
Your going to have to contact the people that wrote the Winsock2005 library you're using to get this question answered.
|
|
|
|
|
A project in VB6 had a reference to a DLL. When the project started it made a decision to load this DLL or not load it (based on reading a configuration setting from a file) If it needed to load it it would launch the DLL which opened a separate window.
After upgrading to .NET, I am not sure how this reference equivalent is done, but when I start my project it always loads this DLL, whether or not I want it to. It appears to load it in the InitializeComponent, but I do not understand why, or how I can prevent it from loading the DLL when I start the project. It is after the initializeConponent that the program looks for the config setting to determine it it should load this. Any idea how I need to handle this?
Public Sub New()
MyBase.New()
If m_vb6FormDefInstance Is Nothing Then
m_vb6FormDefInstance = Me
End If
'This call is required by the Windows Form Designer.
InitializeComponent() ' loads my dll here for some reason
End Sub
Any help or point in a good direction is appreciated...
No-e
|
|
|
|
|
I strongly suspect that one of the controls you are using in your upgraded application uses some method/control from the VB6 dll. That is the only way I know that the dll can get loaded in InitializeComponent().
Just in case you don't know how to use the dll in code, here[^] is a link I have found useful in the past, although there are loads more out there.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I am working on a VB2008 project and added the HelpProvider control to display a .chm file. I had built the .chm file and tested before trying to use. However everytime I tried to display it in my VB application the index tab was empty. When I closed the HTML viewer (which I assume is hh.exe) it caused an exception and displayed the familar "Send Report" dialog. Up on further testing I discovered that I could no longer display any .chm file on my system including the one that had previously worked. It almost seems like something in VS2008 has clobbered a link in my system that no longer will properly display any .chm file that has an index associated with it. Has anyone seen this problem before and/or know of a solution?
|
|
|
|
|
I was finally able to solve my own problem by simply reregistering (regsrv32) the HHCTRL.OCX module. I don't know how the problem started or why this fixed it but it did.
|
|
|
|
|
I am trying to create print designer. Users can drag and place fields according to their needs.i searched many places. could not find a working vb.net sample code. please help thanks in advance
|
|
|
|
|
Well, what have you tried? Can you explain clearer what it is you are trying to construct? Are you simply looking for a working example or are you attempting to create something yourself?
|
|
|
|
|