Showing posts with label trouble. Show all posts
Showing posts with label trouble. Show all posts

Tuesday, March 20, 2012

connection object to client ce

yo ce folks... Anyone had any trouble using a dataset for return values in a datagridview for the client app?

trying to make this work...

' Open the Connection For SQL Compact Edition

Dim cn As New SqlServerCe.SqlCeConnection("Data Source = " & Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\ffgsCRM.sdf")

Dim cmdProduct As SqlServerCe.SqlCeCommand

' create dataset with table

cn.Open()

cmdProduct = cn.CreateCommand

cmdProduct.CommandText = "SELECT ProductDesc AS Description, ProductCost AS Cost, ProductListPrice AS [List Price] FROM Product"

Dim daProduct As New SqlServerCe.SqlCeDataAdapter(cmdProduct)

Dim dtProduct As New Data.DataTable("Product")

daProduct.Fill(dtProduct)

Dim ds As New DataSet

ds.Tables.Add(dtProduct)

'' FILL DATAGRIDVIEW

Me.dbGridProducts.DataSource = ds

I have this working:

' search product description

Dim reqProductSearch As String

reqProductSearch = tstxtSearchDescription.Text

' Open the Connection For SQL Compact Edition

Dim _conn = New SqlCeConnection("Data Source = " & Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\ffgsCRM.sdf")

Dim cmd As New SqlCeCommand()

cmd.Connection = _conn

cmd.CommandText = "select ProductDesc as Description, ProductCost as Cost, ProductListPrice as [List Price] from Product where ProductDesc like '%" & reqProductSearch & "%' ORDER BY ProductDesc"

_conn.Open()

Dim resultSet As SqlCeResultSet

resultSet = cmd.ExecuteResultSet(ResultSetOptions.Scrollable Or ResultSetOptions.Updatable)

'' FILL DATAGRIDVIEW

dbGridProducts.DataSource = resultSet

With dbGridProducts

.Columns("Description").Width = 550

End With

Thanks,

Bill

Hi,
did you try binding the table to the grid rather the dataset ? Did you get an error message on the first solution ? And why are you creating a dataset first just for binding ?
Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

hi... on the first solution when i'm getting

(ArgumentException was unhandled) Child list for field ProductDesc cannot be created when i use either ProductDesc or just Description as it would be in a a regular dataset like in SQLExpress... etc...

Dim ds As New DataSet

ds.Tables.Add(dtProduct)

Me.dbGridProducts.DataSource = ds

Me.dbGridProducts.DataMember = "Description"

this fails... i need the dataset for grouping and such and would like to know how it's done with CE...

Thanks,

Bill

|||

got my brain back... DataTable and Dataset examples... :)

'To Open the Connection To Connect to SQLCE

Dim ConsqlCombo As New SqlCeConnection

ConsqlCombo.ConnectionString = "Data Source = " & Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\ffgsCRM.sdf"

'SQL STATEMENT......

Dim reqSQLCombo As New SqlCeCommand

reqSQLCombo.CommandText = "select ProductDesc as Description, ProductCost as Cost, ProductListPrice as [List Price] from Product where ProductMfgID = '" & reqSearch & "'"

reqSQLCombo.CommandType = CommandType.Text

reqSQLCombo.Connection = ConsqlCombo

'CREATE NEW SQL DATA ADAPTER

Dim sqldaCombo As New SqlCeDataAdapter(reqSQLCombo)

Dim sqldsCombo As New DataSet

' FILL DATASET

sqldaCombo.Fill(sqldsCombo, "ProductDesc")

'' FILL DATAGRID

dbGridProducts.DataSource = sqldsCombo.Tables("ProductDesc")

dbGridProducts.DataMember = "ProductDesc"

connection object to client ce

yo ce folks... Anyone had any trouble using a dataset for return values in a datagridview for the client app?

trying to make this work...

' Open the Connection For SQL Compact Edition

Dim cn As New SqlServerCe.SqlCeConnection("Data Source = " & Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\ffgsCRM.sdf")

Dim cmdProduct As SqlServerCe.SqlCeCommand

' create dataset with table

cn.Open()

cmdProduct = cn.CreateCommand

cmdProduct.CommandText = "SELECT ProductDesc AS Description, ProductCost AS Cost, ProductListPrice AS [List Price] FROM Product"

Dim daProduct As New SqlServerCe.SqlCeDataAdapter(cmdProduct)

Dim dtProduct As New Data.DataTable("Product")

daProduct.Fill(dtProduct)

Dim ds As New DataSet

ds.Tables.Add(dtProduct)

'' FILL DATAGRIDVIEW

Me.dbGridProducts.DataSource = ds

I have this working:

' search product description

Dim reqProductSearch As String

reqProductSearch = tstxtSearchDescription.Text

' Open the Connection For SQL Compact Edition

Dim _conn = New SqlCeConnection("Data Source = " & Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\ffgsCRM.sdf")

Dim cmd As New SqlCeCommand()

cmd.Connection = _conn

cmd.CommandText = "select ProductDesc as Description, ProductCost as Cost, ProductListPrice as [List Price] from Product where ProductDesc like '%" & reqProductSearch & "%' ORDER BY ProductDesc"

_conn.Open()

Dim resultSet As SqlCeResultSet

resultSet = cmd.ExecuteResultSet(ResultSetOptions.Scrollable Or ResultSetOptions.Updatable)

'' FILL DATAGRIDVIEW

dbGridProducts.DataSource = resultSet

With dbGridProducts

.Columns("Description").Width = 550

End With

Thanks,

Bill

Hi,
did you try binding the table to the grid rather the dataset ? Did you get an error message on the first solution ? And why are you creating a dataset first just for binding ?
Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

hi... on the first solution when i'm getting

(ArgumentException was unhandled) Child list for field ProductDesc cannot be created when i use either ProductDesc or just Description as it would be in a a regular dataset like in SQLExpress... etc...

Dim ds As New DataSet

ds.Tables.Add(dtProduct)

Me.dbGridProducts.DataSource = ds

Me.dbGridProducts.DataMember = "Description"

this fails... i need the dataset for grouping and such and would like to know how it's done with CE...

Thanks,

Bill

|||

got my brain back... DataTable and Dataset examples... :)

'To Open the Connection To Connect to SQLCE

Dim ConsqlCombo As New SqlCeConnection

ConsqlCombo.ConnectionString = "Data Source = " & Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\ffgsCRM.sdf"

'SQL STATEMENT......

Dim reqSQLCombo As New SqlCeCommand

reqSQLCombo.CommandText = "select ProductDesc as Description, ProductCost as Cost, ProductListPrice as [List Price] from Product where ProductMfgID = '" & reqSearch & "'"

reqSQLCombo.CommandType = CommandType.Text

reqSQLCombo.Connection = ConsqlCombo

'CREATE NEW SQL DATA ADAPTER

Dim sqldaCombo As New SqlCeDataAdapter(reqSQLCombo)

Dim sqldsCombo As New DataSet

' FILL DATASET

sqldaCombo.Fill(sqldsCombo, "ProductDesc")

'' FILL DATAGRID

dbGridProducts.DataSource = sqldsCombo.Tables("ProductDesc")

dbGridProducts.DataMember = "ProductDesc"

Connection Mystery

I am having trouble connecting to an SQL Server from an ASP.NET pagewritten in C#. I have reduced the code in my page to this:
public void Page_Load( object s, EventArgs e ) {
SqlConnection conn = new SqlConnection( "Server=server;User ID=user;Password=pass;" );
conn.Open();
}
and I get the following error:
System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.

Thisworks for other server/user/pass except the one I am having troublewith. The SQL Server is using SQL & Windows Authentication. I amable to connect from the machine that is running the webserver viaosql, ODBC, and MS Access using the same arguments (server, user, andpass), so I know that the SQL server does exist, and the User/Passwordshould give me access.
Does anyone have any ideas why thisisn't working or what ASP.NET is does differently from the other accessmethods? Any ideas are greatly appreciated.
Thanks,
Mark Daneyou havent specified what database to connect to..check out thiswebsite for connection strings|||I have tried it with and without using a database name in theconnection string. It does not work either way.
I have tried a variety of connection strings options but none of thecombonations seem to work. However they work connecting to adifferent SQL Server, which makes me think that it is something withthis specific SQL Server. However I am able to connect to theserver through osql, ODBC, or MS Access all without a problem, so Idon't belive it is a problem with the SQL Server accepting the login.Since it doesn't seem to be a problem with the connection stringattributes, or the server, I am not sure what could be causing it.
|||are you sure you have the values properly like the server name, database name uid, pwd all correct ? and can you connect to the sql server from query analyzer using the same credentials ?|||

Try this url for the database permissions setup, if no money transactions passes through the site. Hope this helps.

http://duhnetnuke.net/DesktopDefault.aspx?tabid=40

Kind regards,

Gift Peddie

|||

The info in this link uses the Master as the default database for your Asp.net account permissions. If you are still having problems with that, then it could be a bug. Hope this helps.

http://duhnetnuke2.net/Default.aspx?tabid=64

|||I found out what the problem was. The SQL Server I was trying toconnect to didn't have the latest service pack installed. Iupgraded the SQL Server to SP3a and now it works fine.

Monday, March 19, 2012

Connection issue with named instance

Hi all,
Since the replacement of new client workstation I've trouble for connection
of these new machines ot My different SQL Servers. On this configuration we
only speak of client/server connected on the same LAN without any antivirus
enabled.
When my users hae their new PC's (W2K - MDAC 2.6 SP1), they try to connect
to my server via for example ODBC and in this case when they browse network
they can't see named instance (only default instance is displayed (port 1433)
!). Next to it if they force the name in the connection string they still
can't connect ot the server, because of the port resolution. My workaround
today is to force the port in the connection string of each client (quite
heavy, 2500 workstations !!!) On my servers I have TCP/IP and Named Pipes
enable.
I've performed different test of connection (telnet 1433 work, PortQRY
return that 1433 and 1434 are working (but it didn't return all the instances
name), ping OK, tracert ok,...)
Any help would be appreciated, thanks in advance
SylvainCan you please follow below links and let us know if it was helpful for you.
http://sqljunkies.com/How%20To/2E1101E0-D5C1-4DBD-A398-FE485DFA439B.scuk
&
http://support.microsoft.com/default.aspx?scid=kb;en-us;287932
Regards
Surajit
"Sylvain" wrote:
> Hi all,
> Since the replacement of new client workstation I've trouble for connection
> of these new machines ot My different SQL Servers. On this configuration we
> only speak of client/server connected on the same LAN without any antivirus
> enabled.
> When my users hae their new PC's (W2K - MDAC 2.6 SP1), they try to connect
> to my server via for example ODBC and in this case when they browse network
> they can't see named instance (only default instance is displayed (port 1433)
> !). Next to it if they force the name in the connection string they still
> can't connect ot the server, because of the port resolution. My workaround
> today is to force the port in the connection string of each client (quite
> heavy, 2500 workstations !!!) On my servers I have TCP/IP and Named Pipes
> enable.
> I've performed different test of connection (telnet 1433 work, PortQRY
> return that 1433 and 1434 are working (but it didn't return all the instances
> name), ping OK, tracert ok,...)
> Any help would be appreciated, thanks in advance
> Sylvain|||Thanks for your reply.
Concerning the first link, after checking all cases the result is the same
than before, the only workaround is to create an alias (force port number).
All my clients even set on dynamically determine port, can't find an instance
other than the default except if I set manually the expected port by the
server.
For the second link, after checking with my network team we have validate
that no firewall are placed between clients and servers.
Thanks for your help
Sylvain
"surajits" wrote:
> Can you please follow below links and let us know if it was helpful for you.
> http://sqljunkies.com/How%20To/2E1101E0-D5C1-4DBD-A398-FE485DFA439B.scuk
> &
> http://support.microsoft.com/default.aspx?scid=kb;en-us;287932
>
> Regards
> Surajit
>
>
> "Sylvain" wrote:
> > Hi all,
> >
> > Since the replacement of new client workstation I've trouble for connection
> > of these new machines ot My different SQL Servers. On this configuration we
> > only speak of client/server connected on the same LAN without any antivirus
> > enabled.
> > When my users hae their new PC's (W2K - MDAC 2.6 SP1), they try to connect
> > to my server via for example ODBC and in this case when they browse network
> > they can't see named instance (only default instance is displayed (port 1433)
> > !). Next to it if they force the name in the connection string they still
> > can't connect ot the server, because of the port resolution. My workaround
> > today is to force the port in the connection string of each client (quite
> > heavy, 2500 workstations !!!) On my servers I have TCP/IP and Named Pipes
> > enable.
> > I've performed different test of connection (telnet 1433 work, PortQRY
> > return that 1433 and 1434 are working (but it didn't return all the instances
> > name), ping OK, tracert ok,...)
> >
> > Any help would be appreciated, thanks in advance
> > Sylvain

Connection issue with named instance

Hi all,
Since the replacement of new client workstation I've trouble for connection
of these new machines ot My different SQL Servers. On this configuration we
only speak of client/server connected on the same LAN without any antivirus
enabled.
When my users hae their new PC's (W2K - MDAC 2.6 SP1), they try to connect
to my server via for example ODBC and in this case when they browse network
they can't see named instance (only default instance is displayed (port 1433)
!). Next to it if they force the name in the connection string they still
can't connect ot the server, because of the port resolution. My workaround
today is to force the port in the connection string of each client (quite
heavy, 2500 workstations !!!) On my servers I have TCP/IP and Named Pipes
enable.
I've performed different test of connection (telnet 1433 work, PortQRY
return that 1433 and 1434 are working (but it didn't return all the instances
name), ping OK, tracert ok,...)
Any help would be appreciated, thanks in advance
Sylvain
Can you please follow below links and let us know if it was helpful for you.
http://sqljunkies.com/How%20To/2E110...85DFA439B.scuk
&
http://support.microsoft.com/default...b;en-us;287932
Regards
Surajit
"Sylvain" wrote:

> Hi all,
> Since the replacement of new client workstation I've trouble for connection
> of these new machines ot My different SQL Servers. On this configuration we
> only speak of client/server connected on the same LAN without any antivirus
> enabled.
> When my users hae their new PC's (W2K - MDAC 2.6 SP1), they try to connect
> to my server via for example ODBC and in this case when they browse network
> they can't see named instance (only default instance is displayed (port 1433)
> !). Next to it if they force the name in the connection string they still
> can't connect ot the server, because of the port resolution. My workaround
> today is to force the port in the connection string of each client (quite
> heavy, 2500 workstations !!!) On my servers I have TCP/IP and Named Pipes
> enable.
> I've performed different test of connection (telnet 1433 work, PortQRY
> return that 1433 and 1434 are working (but it didn't return all the instances
> name), ping OK, tracert ok,...)
> Any help would be appreciated, thanks in advance
> Sylvain
|||Thanks for your reply.
Concerning the first link, after checking all cases the result is the same
than before, the only workaround is to create an alias (force port number).
All my clients even set on dynamically determine port, can't find an instance
other than the default except if I set manually the expected port by the
server.
For the second link, after checking with my network team we have validate
that no firewall are placed between clients and servers.
Thanks for your help
Sylvain
"surajits" wrote:
[vbcol=seagreen]
> Can you please follow below links and let us know if it was helpful for you.
> http://sqljunkies.com/How%20To/2E110...85DFA439B.scuk
> &
> http://support.microsoft.com/default...b;en-us;287932
>
> Regards
> Surajit
>
>
> "Sylvain" wrote:

Connection issue with named instance

Hi all,
Since the replacement of new client workstation I've trouble for connection
of these new machines ot My different SQL Servers. On this configuration we
only speak of client/server connected on the same LAN without any antivirus
enabled.
When my users hae their new PC's (W2K - MDAC 2.6 SP1), they try to connect
to my server via for example ODBC and in this case when they browse network
they can't see named instance (only default instance is displayed (port 1433
)
!). Next to it if they force the name in the connection string they still
can't connect ot the server, because of the port resolution. My workaround
today is to force the port in the connection string of each client (quite
heavy, 2500 workstations !!!) On my servers I have TCP/IP and Named Pipes
enable.
I've performed different test of connection (telnet 1433 work, PortQRY
return that 1433 and 1434 are working (but it didn't return all the instance
s
name), ping OK, tracert ok,...)
Any help would be appreciated, thanks in advance
SylvainCan you please follow below links and let us know if it was helpful for you.
http://sqljunkies.com/How%20To/2E11...485DFA439B.scuk
&
http://support.microsoft.com/defaul...kb;en-us;287932
Regards
Surajit
"Sylvain" wrote:

> Hi all,
> Since the replacement of new client workstation I've trouble for connectio
n
> of these new machines ot My different SQL Servers. On this configuration w
e
> only speak of client/server connected on the same LAN without any antiviru
s
> enabled.
> When my users hae their new PC's (W2K - MDAC 2.6 SP1), they try to connect
> to my server via for example ODBC and in this case when they browse networ
k
> they can't see named instance (only default instance is displayed (port 14
33)
> !). Next to it if they force the name in the connection string they still
> can't connect ot the server, because of the port resolution. My workaround
> today is to force the port in the connection string of each client (quite
> heavy, 2500 workstations !!!) On my servers I have TCP/IP and Named Pipes
> enable.
> I've performed different test of connection (telnet 1433 work, PortQRY
> return that 1433 and 1434 are working (but it didn't return all the instan
ces
> name), ping OK, tracert ok,...)
> Any help would be appreciated, thanks in advance
> Sylvain|||Thanks for your reply.
Concerning the first link, after checking all cases the result is the same
than before, the only workaround is to create an alias (force port number).
All my clients even set on dynamically determine port, can't find an instanc
e
other than the default except if I set manually the expected port by the
server.
For the second link, after checking with my network team we have validate
that no firewall are placed between clients and servers.
Thanks for your help
Sylvain
"surajits" wrote:
[vbcol=seagreen]
> Can you please follow below links and let us know if it was helpful for yo
u.
> http://sqljunkies.com/How%20To/2E11...485DFA439B.scuk
> &
> http://support.microsoft.com/defaul...kb;en-us;287932
>
> Regards
> Surajit
>
>
> "Sylvain" wrote:
>

Thursday, March 8, 2012

Connection fails during unit test

Hi
I am having trouble with a connection within our local network. A
development machine needs to connect to the main dev db server. Visual
Studio and Enterprise Manager on the dev machine connect fine. The
application under development connects fine when it is run with the
connection string
"Data Source=[servername]; Initial Catalog=[dbName];
Trusted_Connection=yes;"
The application also connects nicely using a named login and password.
My problem is, when we run unit tests with NUnit on a remote machine the
connection attempt returns 'Sql Server does not exist or access denied'
with the same connection string. We have completely turned off all
firewalls etc to no avail.
Any Ideas?
Thanks
Graham
Have the remote machine test connecting with a new ODBC DSN. Press the
Test
button on the ODBC Wizard and report the OS error returned. Since the
machine is remote,
it could be a problem with name resolution.
Ex. 11001 == HostNameNotFound == DNS/WINS issue.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
|||Kevin McDonnell [MSFT] wrote:

> Have the remote machine test connecting with a new ODBC DSN. Press the
> Test
> button on the ODBC Wizard and report the OS error returned. Since the
> machine is remote,
> it could be a problem with name resolution.
> Ex. 11001 == HostNameNotFound == DNS/WINS issue.
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>
Thanks for the reply Kevin...
I have tried the ODBC wizard and the connection works fine. As I said I
have no problem connecting from the remote machine using Enterprise
Manager and Visual Studio, it is just the NUnit tests that can't access
the db server.
Thanks again
Graham
|||"when we run unit tests with NUnit on a remote machine the
connection attempt returns 'Sql Server does not exist or access denied'
with the same connection string. "
I would run network traces to determine where the problem is. You need to
validate
that the tcp connection is being made and the connection string is correct.
An ODBC trace won't show
you this level of detail.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
|||Kevin McDonnell [MSFT] wrote:
> "when we run unit tests with NUnit on a remote machine the
> connection attempt returns 'Sql Server does not exist or access denied'
> with the same connection string. "
> I would run network traces to determine where the problem is. You need to
> validate
> that the tcp connection is being made and the connection string is correct.
> An ODBC trace won't show
> you this level of detail.
>
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>
Thanks again Kevin
My networking knowledge is a little lacking I'm afraid. Could you give
me some pointers on how I would go about running 'network traces'.
Thanks
Graham
|||SQL Server is a Winsock application. So the 2nd article will help you
understand what to look for.
If you need more help you can always open up a support case.
Windows 2000 Server has netmon installed . You just need to enable it via
Add/Remove Windows components.
This version captures traffic to and from that machine. Only SMS has the
full version to capture traffic on any machine.
Q148942 How to Capture Network Traffic with Network Monitor
Q169292 The Basics of Reading TCP/IP Traces
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Connection fails during unit test

Hi
I am having trouble with a connection within our local network. A
development machine needs to connect to the main dev db server. Visual
Studio and Enterprise Manager on the dev machine connect fine. The
application under development connects fine when it is run with the
connection string
"Data Source=[servername]; Initial Catalog=[dbName];
Trusted_Connection=yes;"
The application also connects nicely using a named login and password.
My problem is, when we run unit tests with NUnit on a remote machine the
connection attempt returns 'Sql Server does not exist or access denied'
with the same connection string. We have completely turned off all
firewalls etc to no avail.
Any Ideas?
Thanks
GrahamHave the remote machine test connecting with a new ODBC DSN. Press the
Test
button on the ODBC Wizard and report the OS error returned. Since the
machine is remote,
it could be a problem with name resolution.
Ex. 11001 == HostNameNotFound == DNS/WINS issue.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Kevin McDonnell [MSFT] wrote:

> Have the remote machine test connecting with a new ODBC DSN. Press the
> Test
> button on the ODBC Wizard and report the OS error returned. Since the
> machine is remote,
> it could be a problem with name resolution.
> Ex. 11001 == HostNameNotFound == DNS/WINS issue.
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>
Thanks for the reply Kevin...
I have tried the ODBC wizard and the connection works fine. As I said I
have no problem connecting from the remote machine using Enterprise
Manager and Visual Studio, it is just the NUnit tests that can't access
the db server.
Thanks again
Graham|||"when we run unit tests with NUnit on a remote machine the
connection attempt returns 'Sql Server does not exist or access denied'
with the same connection string. "
I would run network traces to determine where the problem is. You need to
validate
that the tcp connection is being made and the connection string is correct.
An ODBC trace won't show
you this level of detail.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Kevin McDonnell [MSFT] wrote:
> "when we run unit tests with NUnit on a remote machine the
> connection attempt returns 'Sql Server does not exist or access denied'
> with the same connection string. "
> I would run network traces to determine where the problem is. You need to
> validate
> that the tcp connection is being made and the connection string is correct
.
> An ODBC trace won't show
> you this level of detail.
>
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>
Thanks again Kevin
My networking knowledge is a little lacking I'm afraid. Could you give
me some pointers on how I would go about running 'network traces'.
Thanks
Graham|||SQL Server is a Winsock application. So the 2nd article will help you
understand what to look for.
If you need more help you can always open up a support case.
Windows 2000 Server has netmon installed . You just need to enable it via
Add/Remove Windows components.
This version captures traffic to and from that machine. Only SMS has the
full version to capture traffic on any machine.
Q148942 How to Capture Network Traffic with Network Monitor
Q169292 The Basics of Reading TCP/IP Traces
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Tuesday, February 14, 2012

Connecting to Sybase

Hi,

I am assuming someone has had success connecting to Sybase from SSIS. I am having trouble. And I freely admit naivety when it comes to something like this. :-)

I installed dbConnector 6.01 which has a Sybase connector as a part of the package. I then tried to create a connection manager for Sybase using OleDb, but it was not an option in the list of OleDb connections. So, am I correct in assuming that I need to use ODBC? If so, is there an OleDb Sybase driver that can be used with SSIS?

Any help in using SSIS to connect to Sybase would be appreciated.

Thanks,

- Joel

Joel,
I've had success connecting to Sybase ASE 12.5.X using OLEDB. The question that needs to be answered, is what type/version of Sybase are you running. Is it Sybase Adaptive Server Anywhere, Sybase Adaptive Server Enterprise, or Sybase SQL Anywhere and what version is it? Depending on the product/version you may be able to get OLE DB drivers from Sybase itself.
I got the OLE DB drivers from the PC Client software that was included in my installation of ASE.
Larry Pope
|||Thank you Larry for your reply. The Sybase database that I want to connect to is version 11.5.1.2.|||Joel,
I've searched the Sybase site and they no longer have any downloads for your version of the software. That isn't really surprising since it is over 5 years old.
If I may ask what type of system is using it? Is it hosting some custom application or is it supporting some commercial application?
If it is supporting a commercial product you might want to ask the vendor to see about OLE DB providers. If it is a standalone install supporting a custom application then you may need to check the original software media for the PC Client tools. I know in my case they were included on the same CD as the server software.
Larry Pope

|||

Hi Larry,

Thanks again for th reply. I think we got it figured out. We installed a more recent driver (ASE) and was able to connect to Sybase through ODBC and OleDb.

- Joel

|||

So we are trying to do something similar. SYBASE ASE 12.5.3

We downloaded the 12.5.1 SDK and installed. Our choices via SSIS as far providers was the same.

We downloaded the 15.0 SDK and installed. Our choices via SSIS as far providers changed to include Sybase OLEDB Provider.

We are still not having any luck connecting., Any help would be appreciated.

TIA

Connecting to Sybase

Hi,

I am assuming someone has had success connecting to Sybase from SSIS. I am having trouble. And I freely admit naivety when it comes to something like this. :-)

I installed dbConnector 6.01 which has a Sybase connector as a part of the package. I then tried to create a connection manager for Sybase using OleDb, but it was not an option in the list of OleDb connections. So, am I correct in assuming that I need to use ODBC? If so, is there an OleDb Sybase driver that can be used with SSIS?

Any help in using SSIS to connect to Sybase would be appreciated.

Thanks,

- Joel

Joel,

I've had success connecting to Sybase ASE 12.5.X using OLEDB. The

question that needs to be answered, is what type/version of Sybase are

you running. Is it Sybase Adaptive Server Anywhere, Sybase Adaptive Server Enterprise, or Sybase

SQL Anywhere and what version is it? Depending on the

product/version you may be able to get OLE DB drivers from Sybase

itself.

I got the OLE DB drivers from the PC Client software that was included in my installation of ASE.

Larry Pope

|||Thank you Larry for your reply. The Sybase database that I want to connect to is version 11.5.1.2.|||Joel,

I've searched the Sybase site and they no longer have any downloads for

your version of the software. That isn't really surprising since

it is over 5 years old.

If I may ask what type of system is using it? Is it hosting some

custom application or is it supporting some commercial

application?

If it is supporting a commercial product you might want to ask the

vendor to see about OLE DB providers. If it is a standalone

install supporting a custom application then you may need to check the

original software media for the PC Client tools. I know in my

case they were included on the same CD as the server software.

Larry Pope|||

Hi Larry,

Thanks again for th reply. I think we got it figured out. We installed a more recent driver (ASE) and was able to connect to Sybase through ODBC and OleDb.

- Joel

|||

So we are trying to do something similar. SYBASE ASE 12.5.3

We downloaded the 12.5.1 SDK and installed. Our choices via SSIS as far providers was the same.

We downloaded the 15.0 SDK and installed. Our choices via SSIS as far providers changed to include Sybase OLEDB Provider.

We are still not having any luck connecting., Any help would be appreciated.

TIA

Connecting To SQLExpress From a VB Console Application

I've been reading through the forums and I have seen that I am not the only person to have trouble simply trying to connect to a database from VB.

Firstly I have created a console application, and from within that application I have created a simple 1 table database and added two rows of data. So I now the database is there and working.

Problem is I keep getting the following error which trying to apply a connection string to an SQLConnection object:

Message: "ExecuteReader requires an open and available Connection. The connection's current state is closed."

The code I am using is as follows:

strSQLConnection = "Data Source=.\SQLEXPRESS;AttachDbFilename=" + Chr(34) + _
My.Computer.FileSystem.CurrentDirectory.ToString() + "\MusicManager.mdf" + Chr(34) + _
";Integrated Security=True;User Instance=True"

Try
conn.ConnectionString = strSQLConnection
...
...

I know the file exists and is in the right location. Why won't SQL Express open the database?

I have successfully created Windows Applications that can connect to a database. What am I doing wrong?

Cheers,

Roy

Did you call Open() on the connection object before trying to execute a command against it?

Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corp.|||Do I feel stupid or what...

That was it. Thanks.

How I missed that I do not know...

Roy|||I can't count the number of times I've forgotten to Open the DB connection or tell the DataReader to Read.

Uriel

Friday, February 10, 2012

Connecting to SQL Server 2005 over VPN Not working

I am having trouble connecting to SQL Server 2005 from my home via VPN
connection to my office. I have enabled remote connections on the
server. I can actually connect to my local SQL Server instance from
the Server machine while connected to the VPN but not the other way
around. I can browse shared folders from the Server machine so my vpn
connection is good. Other machines in the office can remotely connect
to the SQL Server instance on the server machine.
Is there some setting on the server, such as somewhere in RRAS, that I
need to configure to allow me to connect?
FYI: I am using SQL Authentication
ThanksHi
"chack.busedge@.gmail.com" wrote:

> I am having trouble connecting to SQL Server 2005 from my home via VPN
> connection to my office. I have enabled remote connections on the
> server. I can actually connect to my local SQL Server instance from
> the Server machine while connected to the VPN but not the other way
> around. I can browse shared folders from the Server machine so my vpn
> connection is good. Other machines in the office can remotely connect
> to the SQL Server instance on the server machine.
> Is there some setting on the server, such as somewhere in RRAS, that I
> need to configure to allow me to connect?
> FYI: I am using SQL Authentication
> Thanks
>
Check out http://support.microsoft.com/kb/287932 on the ports that you will
need to have access to for the connection. Have you tried terminal services
or Remote desktop to access the server?
John|||On Jun 28, 12:32 pm, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi
>
>
> "chack.buse...@.gmail.com" wrote:
>
>
>
> Check outhttp://support.microsoft.com/kb/287932on the ports that you will
> need to have access to for the connection. Have you tried terminal service
s
> or Remote desktop to access the server?
> John- Hide quoted text -
> - Show quoted text -
The VPN was configured using the RRAS console. Is there something I
need to configure there to allow port 1433 access via VPN?
Yes, I can remote desktop into the server. That's how I am
configuring the VPN.
Thanks|||On Jun 28, 1:39 pm, chack.buse...@.gmail.com wrote:
> On Jun 28, 12:32 pm, John Bell <jbellnewspo...@.hotmail.com> wrote:
>
>
>
>
>
>
>
>
>
>
> TheVPNwas configured using the RRAS console. Is there something I
> need to configure there to allow port 1433 access viaVPN?
> Yes, I can remote desktop into theserver. That's how I am
> configuring theVPN.
> Thanks- Hide quoted text -
> - Show quoted text -
Ok, I finally got something to work. I was reviewing this article
http://support.microsoft.com/kb/265808 when I found the IPAll Dynamic
Ports value to be 1033. On a whim I decided to set my server name
value for my connection to...
SERVER\INSTANCENAME,1033
And voila, it freeking worked. I don't know why, but at this point I
don't care. I am thrilled to have a connection that I can use at
home. I sure hope this helps out someone else in the future.|||Hi
"chack.busedge@.gmail.com" wrote:

> On Jun 28, 1:39 pm, chack.buse...@.gmail.com wrote:
> Ok, I finally got something to work. I was reviewing this article
> http://support.microsoft.com/kb/265808 when I found the IPAll Dynamic
> Ports value to be 1033. On a whim I decided to set my server name
> value for my connection to...
> SERVER\INSTANCENAME,1033
> And voila, it freeking worked. I don't know why, but at this point I
> don't care. I am thrilled to have a connection that I can use at
> home. I sure hope this helps out someone else in the future.
>
You had not said that you had a named instance of SQL Server!! By default
that will use a dynamic port instead of 1433 see
http://msdn2.microsoft.com/en-us/library/ms177440.aspx You have forced the
server to use a specific port (which seems to be open!!)
Ports from 1024 through 49151 are IANA registered ports, and 1033 is
registered for netinfo. IANA recommend that dynamic or Private Ports from
49152 through 65535 are used.
John

Connecting to SQL Server 2005 over VPN Not working

I am having trouble connecting to SQL Server 2005 from my home via VPN
connection to my office. I have enabled remote connections on the
server. I can actually connect to my local SQL Server instance from
the Server machine while connected to the VPN but not the other way
around. I can browse shared folders from the Server machine so my vpn
connection is good. Other machines in the office can remotely connect
to the SQL Server instance on the server machine.
Is there some setting on the server, such as somewhere in RRAS, that I
need to configure to allow me to connect?
FYI: I am using SQL Authentication
Thanks
Hi
"chack.busedge@.gmail.com" wrote:

> I am having trouble connecting to SQL Server 2005 from my home via VPN
> connection to my office. I have enabled remote connections on the
> server. I can actually connect to my local SQL Server instance from
> the Server machine while connected to the VPN but not the other way
> around. I can browse shared folders from the Server machine so my vpn
> connection is good. Other machines in the office can remotely connect
> to the SQL Server instance on the server machine.
> Is there some setting on the server, such as somewhere in RRAS, that I
> need to configure to allow me to connect?
> FYI: I am using SQL Authentication
> Thanks
>
Check out http://support.microsoft.com/kb/287932 on the ports that you will
need to have access to for the connection. Have you tried terminal services
or Remote desktop to access the server?
John
|||On Jun 28, 12:32 pm, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi
>
>
> "chack.buse...@.gmail.com" wrote:
>
>
> Check outhttp://support.microsoft.com/kb/287932on the ports that you will
> need to have access to for the connection. Have you tried terminal services
> or Remote desktop to access the server?
> John- Hide quoted text -
> - Show quoted text -
The VPN was configured using the RRAS console. Is there something I
need to configure there to allow port 1433 access via VPN?
Yes, I can remote desktop into the server. That's how I am
configuring the VPN.
Thanks
|||On Jun 28, 1:39 pm, chack.buse...@.gmail.com wrote:
> On Jun 28, 12:32 pm, John Bell <jbellnewspo...@.hotmail.com> wrote:
>
>
>
>
>
>
> TheVPNwas configured using the RRAS console. Is there something I
> need to configure there to allow port 1433 access viaVPN?
> Yes, I can remote desktop into theserver. That's how I am
> configuring theVPN.
> Thanks- Hide quoted text -
> - Show quoted text -
Ok, I finally got something to work. I was reviewing this article
http://support.microsoft.com/kb/265808 when I found the IPAll Dynamic
Ports value to be 1033. On a whim I decided to set my server name
value for my connection to...
SERVER\INSTANCENAME,1033
And voila, it freeking worked. I don't know why, but at this point I
don't care. I am thrilled to have a connection that I can use at
home. I sure hope this helps out someone else in the future.
|||Hi
"chack.busedge@.gmail.com" wrote:

> On Jun 28, 1:39 pm, chack.buse...@.gmail.com wrote:
> Ok, I finally got something to work. I was reviewing this article
> http://support.microsoft.com/kb/265808 when I found the IPAll Dynamic
> Ports value to be 1033. On a whim I decided to set my server name
> value for my connection to...
> SERVER\INSTANCENAME,1033
> And voila, it freeking worked. I don't know why, but at this point I
> don't care. I am thrilled to have a connection that I can use at
> home. I sure hope this helps out someone else in the future.
>
You had not said that you had a named instance of SQL Server!! By default
that will use a dynamic port instead of 1433 see
http://msdn2.microsoft.com/en-us/library/ms177440.aspx You have forced the
server to use a specific port (which seems to be open!!)
Ports from 1024 through 49151 are IANA registered ports, and 1033 is
registered for netinfo. IANA recommend that dynamic or Private Ports from
49152 through 65535 are used.
John

Connecting to SQL Server 2005 over VPN Not working

I am having trouble connecting to SQL Server 2005 from my home via VPN
connection to my office. I have enabled remote connections on the
server. I can actually connect to my local SQL Server instance from
the Server machine while connected to the VPN but not the other way
around. I can browse shared folders from the Server machine so my vpn
connection is good. Other machines in the office can remotely connect
to the SQL Server instance on the server machine.
Is there some setting on the server, such as somewhere in RRAS, that I
need to configure to allow me to connect?
FYI: I am using SQL Authentication
ThanksHi
"chack.busedge@.gmail.com" wrote:
> I am having trouble connecting to SQL Server 2005 from my home via VPN
> connection to my office. I have enabled remote connections on the
> server. I can actually connect to my local SQL Server instance from
> the Server machine while connected to the VPN but not the other way
> around. I can browse shared folders from the Server machine so my vpn
> connection is good. Other machines in the office can remotely connect
> to the SQL Server instance on the server machine.
> Is there some setting on the server, such as somewhere in RRAS, that I
> need to configure to allow me to connect?
> FYI: I am using SQL Authentication
> Thanks
>
Check out http://support.microsoft.com/kb/287932 on the ports that you will
need to have access to for the connection. Have you tried terminal services
or Remote desktop to access the server?
John|||On Jun 28, 12:32 pm, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi
>
>
> "chack.buse...@.gmail.com" wrote:
> > I am having trouble connecting to SQL Server 2005 from my home via VPN
> > connection to my office. I have enabled remote connections on the
> > server. I can actually connect to my local SQL Server instance from
> > the Server machine while connected to the VPN but not the other way
> > around. I can browse shared folders from the Server machine so my vpn
> > connection is good. Other machines in the office can remotely connect
> > to the SQL Server instance on the server machine.
> > Is there some setting on the server, such as somewhere in RRAS, that I
> > need to configure to allow me to connect?
> > FYI: I am using SQL Authentication
> > Thanks
> Check outhttp://support.microsoft.com/kb/287932on the ports that you will
> need to have access to for the connection. Have you tried terminal services
> or Remote desktop to access the server?
> John- Hide quoted text -
> - Show quoted text -
The VPN was configured using the RRAS console. Is there something I
need to configure there to allow port 1433 access via VPN?
Yes, I can remote desktop into the server. That's how I am
configuring the VPN.
Thanks|||On Jun 28, 1:39 pm, chack.buse...@.gmail.com wrote:
> On Jun 28, 12:32 pm, John Bell <jbellnewspo...@.hotmail.com> wrote:
>
>
> > Hi
> > "chack.buse...@.gmail.com" wrote:
> > > I am having trouble connecting toSQLServer2005from my home viaVPN
> > > connection to my office. I have enabled remote connections on the
> > >server. I can actually connect to my localSQLServerinstance from
> > > theServermachine while connected to theVPNbut not the other way
> > > around. I can browse shared folders from theServermachine so myvpn
> > > connection is good. Other machines in the office can remotely connect
> > > to theSQLServerinstance on theservermachine.
> > > Is there some setting on theserver, such as somewhere in RRAS, that I
> > > need to configure to allow me to connect?
> > > FYI: I am usingSQLAuthentication
> > > Thanks
> > Check outhttp://support.microsoft.com/kb/287932onthe ports that you will
> > need to have access to for the connection. Have you tried terminal services
> > or Remote desktop to access theserver?
> > John- Hide quoted text -
> > - Show quoted text -
> TheVPNwas configured using the RRAS console. Is there something I
> need to configure there to allow port 1433 access viaVPN?
> Yes, I can remote desktop into theserver. That's how I am
> configuring theVPN.
> Thanks- Hide quoted text -
> - Show quoted text -
Ok, I finally got something to work. I was reviewing this article
http://support.microsoft.com/kb/265808 when I found the IPAll Dynamic
Ports value to be 1033. On a whim I decided to set my server name
value for my connection to...
SERVER\INSTANCENAME,1033
And voila, it freeking worked. I don't know why, but at this point I
don't care. I am thrilled to have a connection that I can use at
home. I sure hope this helps out someone else in the future.|||Hi
"chack.busedge@.gmail.com" wrote:
> On Jun 28, 1:39 pm, chack.buse...@.gmail.com wrote:
> > On Jun 28, 12:32 pm, John Bell <jbellnewspo...@.hotmail.com> wrote:
> >
> >
> >
> >
> >
> > > Hi
> >
> > > "chack.buse...@.gmail.com" wrote:
> > > > I am having trouble connecting toSQLServer2005from my home viaVPN
> > > > connection to my office. I have enabled remote connections on the
> > > >server. I can actually connect to my localSQLServerinstance from
> > > > theServermachine while connected to theVPNbut not the other way
> > > > around. I can browse shared folders from theServermachine so myvpn
> > > > connection is good. Other machines in the office can remotely connect
> > > > to theSQLServerinstance on theservermachine.
> >
> > > > Is there some setting on theserver, such as somewhere in RRAS, that I
> > > > need to configure to allow me to connect?
> >
> > > > FYI: I am usingSQLAuthentication
> >
> > > > Thanks
> >
> > > Check outhttp://support.microsoft.com/kb/287932onthe ports that you will
> > > need to have access to for the connection. Have you tried terminal services
> > > or Remote desktop to access theserver?
> >
> > > John- Hide quoted text -
> >
> > > - Show quoted text -
> >
> > TheVPNwas configured using the RRAS console. Is there something I
> > need to configure there to allow port 1433 access viaVPN?
> >
> > Yes, I can remote desktop into theserver. That's how I am
> > configuring theVPN.
> >
> > Thanks- Hide quoted text -
> >
> > - Show quoted text -
> Ok, I finally got something to work. I was reviewing this article
> http://support.microsoft.com/kb/265808 when I found the IPAll Dynamic
> Ports value to be 1033. On a whim I decided to set my server name
> value for my connection to...
> SERVER\INSTANCENAME,1033
> And voila, it freeking worked. I don't know why, but at this point I
> don't care. I am thrilled to have a connection that I can use at
> home. I sure hope this helps out someone else in the future.
>
You had not said that you had a named instance of SQL Server!! By default
that will use a dynamic port instead of 1433 see
http://msdn2.microsoft.com/en-us/library/ms177440.aspx You have forced the
server to use a specific port (which seems to be open!!)
Ports from 1024 through 49151 are IANA registered ports, and 1033 is
registered for netinfo. IANA recommend that dynamic or Private Ports from
49152 through 65535 are used.
John

Connecting to SQL Server 2005 Express using IIS 6.0

Hello,

I can connect to amachine using SQL server 2000 using IIS 6.0. However, I am having trouble connecting to my server that has SQL server express using IIS 6.0. I'm using similar setting for both servers. Is there something else i have to do for SQL server express?

I'm not sure why this is the case. Any information that could help resolve this failed connection would be greatly appreciated.

Thank you.

Burhan

I would make sure that the remote connections have been enabled on the server, by default this is turned off.

How to configure SQL Server 2005 to allow remote conections
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277

|||

Thank you for your email. My sql server express are already configured according to the tips on this page. I failed to mention that i can connect to the database. It's only when i have to try and connect to the databse wirelessly i'm having trouble establising a connection to the database. But when i connect wirelessly to SQL 2000 i have no trouble.

Any more information would be appreciated.

Burhan