|
Your question doesn't make much sense. Are you trying to connect to a SQL Server 2005 database?? If so, you have to go into the SQL Server configuration manager and turn on TCP/IP connections. By default, an SQL Server 2005 installation will only accept connections from applications running on the machine the server is installed on.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave thank you for your response,
We work with VB6, VB.NET, VB.NET.2003 and the last VB.NET.2005
We try to walk with the technology.
When work with VB6, VB.NET, VB.NET.2003 don't have problem, what I can say, we don't to change nothing because works fine.
But, since install VB.NET.2005 and try to do an application don't can stablish a conexion to the server.
So, we don't need to change the configuration but meaby vb.net.2005 requieres to change, and we don't have the config to change, I look on sql-server-tool and have de TCP/IP added (enabled), you refer to this?
The NET
Principal Server (have the DB)
Have a Domain
We attach to the domain
I test on two ways from client to server and server to client to stablish conexion but don't stablish.
Hope that you can help us
gangeles
|
|
|
|
|
There's nothing to change!
You might want to look into making sure that you have the latest MDAC[^] installed.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave
Than you again for your response.
Exactly, we now test with the 3 forms to connect:
1. Standard Security
2. Trusted Connection
3. Connect via an IP address
(referer : http://www.connectionstrings.com/)
So, we have 3 more servers and try to connect to them, but only one server failed to connect.
I think like you is a configuration (meaby SQL server) or software to install problem, but We don't know what it´s.
We can follow like first step the MDAC
gangeles
|
|
|
|
|
I'm a new programmer. I would like to know the code for a cascading menu like you see in windows. Thanks.
Dodz
|
|
|
|
|
Hey, everybody.
I have a panel within a user control that I need to add link labels to. During runtime, the user selects an item from a combo box and based on which item is selected a list of filenames is returned from a database which are then respectively and dynamically made into link labels and added to the panel.
My problem is that I'm new to VB as a whole and I'm ignorant as to how one can add events to dynamically-created controls. In this instance, I would need to know when one of the link labels is clicked and which one was clicked.
Below is the code I have currently which works correctly to populate the panel with the link labels. Any help would be greatly appreciated. Thank you!
If (strSourcePath.Contains(",")) Then
strFilePaths = strSourcePath.Split(",")
nNumFiles = strFilePaths.Length
ReDim xLinkList(nNumFiles)
Dim nCount As Integer
For nCount = 0 To nNumFiles - 1
strFileNames = strFilePaths(nCount).Split("\")
xLinkList(nCount) = New LinkLabel()
xLinkList(nCount).Name = "lnkLabel" & nCount
xLinkList(nCount).Text = strFileNames(4)
Next
Else
nNumFiles = 1
If (System.IO.File.Exists(strSourcePath)) Then
strFileNames = strSourcePath.Split("\")
xLinkList(0) = New LinkLabel
xLinkList(0).Name = "lnkLabel"
xLinkList(0).Text = strFileNames(4)
End If
End If
panFiles.Controls.AddRange(xLinkList)
Dim i As Integer
For i = 0 To nNumFiles - 1
panFiles.Controls.Item(i).Dock = DockStyle.Top
Next
-- modified at 17:40 Tuesday 11th July, 2006
|
|
|
|
|
Take a look at the AddHandler method.
Something like this..... (code from memory so usual warranty applies )
If (strSourcePath.Contains(",")) Then
strFilePaths = strSourcePath.Split(",")
nNumFiles = strFilePaths.Length
ReDim xLinkList(nNumFiles)
Dim nCount As Integer
For nCount = 0 To nNumFiles - 1
strFileNames = strFilePaths(nCount).Split("\")
xLinkList(nCount) = New LinkLabel()
xLinkList(nCount).Name = "lnkLabel" & nCount
xLinkList(nCount).Text = strFileNames(4)
AddHandler xlinkList(nCount).Click AddressOf ClickHandler
Next
Else
nNumFiles = 1
If (System.IO.File.Exists(strSourcePath)) Then
strFileNames = strSourcePath.Split("\")
xLinkList(0) = New LinkLabel
xLinkList(0).Name = "lnkLabel"
xLinkList(0).Text = strFileNames(4)
AddHandler xlinkList(0).Click AddressOf ClickHandler
End If
End If
panFiles.Controls.AddRange(xLinkList)
Dim i As Integer
For i = 0 To nNumFiles - 1
panFiles.Controls.Item(i).Dock = DockStyle.Top
Next
Private Sub ClickHandler(sender As Object, e As EventArgs)
MessageBox.Show(DirectCast(sender, LinkButton).Name)
End Sub
My Blog[^] FFRF[^]
-- modified at 17:55 Tuesday 11th July, 2006
|
|
|
|
|
Awesome and thank you!
AddHandler xlinkList(0).Click, AddressOf ClickHandler worked like a charm. Additionally, I didn't know about the DirectCast method in VB so I was able to use that for other purposes as well to simplify my work. For those interested, the following is how I wrote my event handler for the dynamically-created link labels:
Private Sub LinkClick(ByVal Sender As Object, ByVal e As EventArgs)
nCurrFileNum = DirectCast(Sender, LinkLabel).Name
strCurrFile = DirectCast(Sender, LinkLabel).Text
Dim webURL As New Uri(strDefaultPath + strCurrFile)
webMain.Url = webURL
End Sub
Where:
nCurrFileNum is the current file number we are currently working with
strCurrFile is the current filename (and just the filename - not the path)
strDefaultPath is the default (read from the database) path to the files
webMain is the webcontrol used within the user control to show the .pdf files
Thank you for the help!
-- modified at 9:42 Wednesday 12th July, 2006
|
|
|
|
|
No problem...
One word though... dependign on how modular you want to make your code you may want to check to make sure that you can actualy do the cast before you do it. That way if for some reason you happen to accidently patch that event hander to a different control you will catch that and not throw an excpetion. Maybe wrap the cast in a try/catch block or something.
You can do something like:
Private Sub ClickHandler(ByVal sender As Object, ByVal e as EventArgs)
If (sender.GetType.ToString = "LinkLabel") then
nCurrFileNum = DirectCast(Sender, LinkLabel).Name
strCurrFile = DirectCast(Sender, LinkLabel).Text
Dim webURL As New Uri(strDefaultPath + strCurrFile)
webMain.Url = webURL
Else
'Not a linklabel control.
End If
End Sub
My Blog[^] FFRF[^]
|
|
|
|
|
have a windows application that accesses a oracle database. I need to
deploy it on an intranet. It is an application that will be access by several
end users. I would like to deploy it in one common place and let end users
execute the same exe thus making it easy it implement changes as they will be
needed. How do you deploy a winform application in this manner?
i've already build msi file and i am deploying on my server but it gives me error that shows unhandled exception.
and also it is running fine on couple of computer ..that i installed on them independently. it is running fine.
Hemaxi
-- modified at 17:20 Tuesday 11th July, 2006
|
|
|
|
|
you should look into clickonce deployment. Basically all you need to do is right click on your project and click on publish.
There is a lot of info from Microsoft on this.
http://msdn2.microsoft.com/en-us/library/t71a733d.aspx
|
|
|
|
|
Hey Gavin
Thanks for ur suggetion.
i've added setup project in my solution. then also i've to do clickonce deployment?
Thanks
hemaxi
|
|
|
|
|
Any machine that the application runs on is going to have to have the Oracle 8i Client installed on them at a minimum. The Oracle provider in .NET can't work without it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hey Dave,
Thanks man.
yeah..every machine have oracle 9i installed . my question is The Oracle Provider for .NET is not installed on every machine. should i install on every machine or if only on server will be fine.
b/c several ppl is going to use this application.its tedious job to install on every client machine . pls. reply me as soon as possible.
i am stuck here with the deployment .
if you have any idea how to deploy my application on server then let me know.
actually what i did is..i ve added setup project in my solution. and built it. and create .msi file.
when i am installing on the other machine and if it has ODP (oracle provider for net) installed on that its running perfectly. but it doesnt have that then its gives me error: "TNS couldnt resolve the service name"
and i am using System.Data.OracleClient and have referenced to my solution.
i m not using DataAccess.dll
i've not referenced to this dll.
i dont have any idea.
If u can reply me.that will be great.
Thanks a lot..
Hemaxi
|
|
|
|
|
hemrk wrote: The Oracle Provider for .NET is not installed on every machine.
It's part of the .NET Framework Base Class Library, so if the .NET Framework is installed, so is the Oracle Provider.
... Or are you talking about the ODBC .NET Data Provider[^]???
If your using this, then, yes, you have to install it on every machine that's going to run your app.
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 12:45 Wednesday 12th July, 2006
|
|
|
|
|
Thanks..for the info.
let me look at the oracle provider..and will get back to u soon...
Thanks a lot
Hemaxi
|
|
|
|
|
have downloded Oracle Data Provider for .NET (ODP.NET) 10g release.
once again..i am not using it in my app. but it was installed on my computer. after i started to build application. and now on other machine if i am not installing this ODP.NET 10g then my application give error that "tns couldnot resolve the service name."
i dont have any idea why its happening..even i didnot add reference to ODP>NET (dataaccess.dll) .
Thanks
Hemaxi
|
|
|
|
|
You might want to try the list of things found here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks for your help.
I resolved the issue..it was sily mistake..
Thanks anyways
Hemaxi
|
|
|
|
|
Greetings everyone!
Question! Is there a way to set up the installer of a VB.NET program that will you set a condition to evaluate that will give the user the choice of either creating a desktop shortcut or not?
Any help would be fantastic!
|
|
|
|
|
|
Unfortunatly no. When you create the shortcut via the file system editor, the shortcut you create does not have a place for checking the condition from one of the installation dialog boxes that I have seen unless I am overlooking something.
If all about are losing their head while you keeping yours, you must be the one holding the axe!
|
|
|
|
|
----------------------------------------
Visual Studio 2003 v7.1.3088
.NET Framework 1.1.4322 SP1
----------------------------------------
I have a large WinForms project.
I have a form where I added a checkbox chkIsEmployee.
Sporatically, I get errors:
'chkIsEmployee' is not a member of 'ClearView.SMS.frmStudentManagement'
However, all of the designer code appears to be intact:
...
[Line 133] Friend WithEvents chkIsEmployee As System.Windows.Forms.CheckBox
...
[Line 181] Me.chkIsEmployee = New System.Windows.Forms.CheckBox
...
[Line 346] Me.grpDemographics.Controls.Add(Me.chkIsEmployee)
...
'
'chkIsEmployee
'
[Line 371] Me.chkIsEmployee.Location = New System.Drawing.Point(222, 99)
[Line 372] Me.chkIsEmployee.Name = "chkIsEmployee"
[Line 373] Me.chkIsEmployee.Size = New System.Drawing.Size(92, 16)
[Line 374] Me.chkIsEmployee.TabIndex = 16
[Line 375] Me.chkIsEmployee.Text = "is employee"
...
Now, I open the form, and the checkbox control is visibly gone.
It is almost as though the compiler is ignoring line 133. All lines after 133 have the error - not 133.
I rebuild the app and sometimes, suddenly all is OK.
I have tried deleteing the checkbox and re-adding it. The problem keeps re-surfacing. It was doing this behavior on a different control before.
Later, I open the form, and the control is gone again, but all the declaritive code in the form is still there.
This happened to me before (in this project with a different form), and I had to create a new form, paste controls on, paste my code in, delete the old form and the behavior went away.
I tried that here, but the behavior keeps comming back.
Is anyone aware of a bug or a fix for this?
Thanks,
-Len Miller
"If I had eight hours to chop down a tree, I'd spend six sharpening my axe."
-Abraham Lincoln
|
|
|
|
|
Yep, it's a bug in the IDE. Nope, there is no permanant fix for it yet. You've already discovered the only work around I know of. SP1 for Visual Studio 2003 should be comming out sometime last month.
Oh! Have you installed SP1 for the .NET Framework 1.1?? If not, get it from here[^].
Visual Studio 2003 Service Pack 1[^]
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 15:36 Tuesday 11th July, 2006
|
|
|
|
|
Hi,
I've been surfing the web for the following question, with no luck. Do you know of any solution regarding having a parent form (MDIparent) calling a DLL and the DLL will be known as child to MDIparent?
Looking forward hearing from you.
Kjartan Þór Guðmundsson
|
|
|
|