|
Environment: Op Sys 2003 server; Sql Server 2005 with update; Visual Studio; Multiple VB functions and subroutines as stored procedures.This subroutine needs to use a connection string to enable MARS. It does not have the SQL Attributes. They seem to prohibit byref class instantiations being returned.
Dim connectionString As String = _
"server=(local);" & _
"Trusted_Connection=yes;" & _
"database=Frontier_equipment;" & _
"MultipleActiveResultSets=true;"
RecordTypeConnection = New SqlConnection()
RecordTypeConnection.ConnectionString = connectionString
RecordTypeConnection.Open()
Error Numr 5
Error Desc An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
rkj
|
|
|
|
|
Are you sure your sql server name is correct? Are you sure the sql server allows trusted connection. Can you ping the sql server name from where you are trying to run this app? Is there an instance of a sql server you are trying to connect to? You have to put that into your server name. Sometimes you have to set a port number for sql server instances. Anyway, a few thoughts, I hope that helps.
Ben
|
|
|
|
|
I had read that Stored procedures running within the SQL Server could use the local option for server name. Placing the combined servername\sqlservername as the servername worked.!! Thank you.
rkj
|
|
|
|
|
Along with what kubben said, your connection string says that it expects the database server to be on the same machine as the one where your code is running. I hope this is true, otherwise you'll have to change your connection string.
Does your SQL Server instance have Named Pipes enabled?
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
The stored procedures are on the same machine as the server. Replacing server(local) with
servername\server made the whole thing work.
rkj
|
|
|
|
|
If it's a stored procedure, you can try "context connection = true" for the connection string to use the connection that the SP is executing under. But, as you can read here[^], this is not always the best idea.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
I was using that but I needed the MARS capability.
rkj
|
|
|
|
|
Hi All
I want to import excel data into SQL Server2000 through VB6.0, but it gave error. Plz Help.
Regards
smk
|
|
|
|
|
suveenmohan wrote: but it gave error.
And that error would be??
suveenmohan wrote: Plz Help.
Not without knowing what the error message was and what the code looks like that generated it.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
i have a window application in which i am using datagridview. i want to use datagridview as dataentry.
Is there any sample i can use
|
|
|
|
|
Thats pretty much what the DataGridView was designed for. Just about every one of the thousands of DataGridView examples out on the web does this very thing. The examples pretty much show you how to do all kinds of customizations so you can tailor the DGV to do data entry.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
somebody helps me.
can vb.net read a html?how?
|
|
|
|
|
|
HTML is nothing but a text file. Where are you trying to read this HTML from? What are you trying to do with it?
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
actually i want to categorize documents.i have html documents. first, i must convert them to doc type. from a html document i just need words in tittle tag and body tag..
|
|
|
|
|
OK. This still doesn't clarify the question at all. Converting them to doc types?? What does that mean? Are you trying to convert an HTML file to a Word document?
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
i just want to get the text in tittle and body, and remove other tags. and then save it as word document. just text, without table, without image.
|
|
|
|
|
I have developed a project which should be implemented in multiple palces.
If it is in VB, we will have an option called PAckage and Deployment which inturn creates all the OCX and DLL files which are required to run the project succesfully.
But in VB.Net, I cannot get the Correct steps to be followed to set the PAckage and Deployment Wizard.
Please Can anyone guide me throught the steps that can create a Package to Ditribute the Code.
Thank you in ADVANCE
|
|
|
|
|
check this^
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
The link you posted goes to Crystal Reports projects....?
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
The Package and Deployment Wizard doesn't exist in the Visual Studio .NET. It's been replaced by the Setup project type, which builds a basic .MSI-based installation for you project. All you have to do is add a second project to your solution (File -> Add -> New Project -> Other Project Types -> Setup and Deployment. In there, you'll find a Setup Wizard that will walk you through creating the basic setup for your project.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
I have a text box. User can type any number of characters in that text Box.
After typing 20th character, a window should pop up and all the characters in the text box should transfer to that window. On click of a button present on the newly opened window, entire text in the window should transfer to that text box again... Please help me.. I am a beginner and very new to javascript and VB.net
|
|
|
|
|
shyamts wrote: I am a beginner and very new to javascript and VB.net
Then this is far too complex a task to set yourself. You should work on some more straightforward things until you understand the two languages, which are very different.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
shyamts wrote: a window should pop up and all the characters in the text box should transfer to that window
This is "Day 1 - Java 101" class type stuff. It's quite possbily one of things you teach you on Day 1 of any Java class. I think you really need to pick up a book on Java and start teaching yourself before you attept to put an application together and frustrate yourself out of a job.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hello,
I have problem that i am creating many object of a user control that is in a parent form.
So when I click delete on the user control it doesn't know which object it should raise the event for.
Normally if i add 5 objects of the user control at run-time, if i click delete on the 5th it will raise the event. However, if I click any of the other 4 will will not raise the event.
The way my program works is that I have a tab control on the parent form. The user will click add and the object that will be created on each of the tabs. if i want to delete one object of the user control on the tab it will only work if is the last one i added.
Is there any solution to this problem?
<br />
Public Event DeleteStatus(result As Boolean)<br />
<br />
Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click<br />
Try<br />
Dim rowsAffected As Integer = 0<br />
rowsAffected = Me.TA_IncidentTask1.DeleteTask(_taskID)<br />
If (rowsAffected = 0) Then<br />
RaiseEvent DeleteStatus(False)<br />
Else<br />
RaiseEvent DeleteStatus(True)<br />
End If<br />
Catch ex As Exception<br />
MessageBox.Show(ex.Message)<br />
End Try<br />
End Sub<br />
Many thanks for any help with this,
Steve
|
|
|
|