Showing posts with label successfully. Show all posts
Showing posts with label successfully. Show all posts

Sunday, March 25, 2012

Connection Problem

Hi

I've got a small problem and i can't figure it out. I can connect successfully to the Microsoft SQL Server "Beauty" (get also nonzero for successfull connection). If i run the application (see code below). I get following Error Message "Illegal Objectname 'TestTabelle' ". I double checked the SQL statement and it should be correct. Even the spelling of TestTabelle is right. For testing purposes I've also included 5-6 data records in the tabel.

I try to connect via ODBC. I've created the database with MS SQL Enterprise Manager. Right Click -> Create New Database. I called it "Test" and created in "Test" a new Table, which is called "TestTabelle".

I found information how i can connect to a ms sql server "Beauty", i've also found how i can connect to a table, BUT where is the information which Database ?`in my case it should be Test.

Anyone can help ?
Thank you

{
CDBVariant value;
char sql_statement [2048] = "";

//CDatabase object "db" created to connect database
CDatabase db;
db.OpenEx(_T("DSN=Beauty;UID=Administrator"), CDatabase::noOdbcDialog);

//CRecordset object "rs" created to access and manipulate database records.
CRecordset rs(&db);
strcpy(sql_statement,_T("SELECT * FROM TestTabelle"));
rs.Open(CRecordset::forwardOnly,sql_statement);

//Get quantity from Database
int n = rs.GetODBCFieldCount( );
while(!rs.IsEOF())
{
for( int i = 0; i < n; i++ )
{
rs.GetFieldValue("index",value);
m_Buy_List.InsertItem(i,LPCTSTR(value.m_pstring));

rs.GetFieldValue("product",value);
m_Buy_List.SetItemText(i,2,LPCTSTR(value.m_pstring ));

rs.GetFieldValue("price",value);
m_Buy_List.SetItemText(i,3,LPCTSTR(value.m_pstring ));
}
rs.MoveNext( );
}

//Close records access.
rs.Close( );

//Close database connection.
db.Close();

}Do you have a default database set? If not try this:

strcpy(sql_statement,_T("USE TEST; SELECT * FROM TestTabelle"));|||1. I dunno how i can set the "Test" Database as default on MS SQL Server

2. If i type "USE TEST;" like you said iam getting a big compiler or error message

:(|||ok, since modifying the logon properties appears to be not acceptible, try this:

strcpy(sql_statement,_T("SELECT * FROM Test.dbo.TestTabelle"));|||thx ms

i could modify the default settings... i will try this sql_statement too..

but somehow i am getting the errors know where i try to access the tabel field.

first one: index (int)
second: product (varchar)
third: price (float)

i ddin't found any error. weird ?

Saturday, February 25, 2012

Connection error

Hi,
I get the following error when I try to connect to SQL 2005 Beta from VS 2005.
"A connection was successfully established with the server, but then an
error occurred during the login process. (provider: TCP Provider, error: 0 -
An existing connection was forcibly closed by the remote host.) "
The calling page "Default.aspx" only has a GridView control.
Help please!!!
"Mumbai_Chef" <MumbaiChef@.discussions.microsoft.com> wrote in message
news:84F879BA-F54F-420C-8576-0CACE17AB39B@.microsoft.com...
> Hi,
> I get the following error when I try to connect to SQL 2005 Beta from VS
> 2005.
> "A connection was successfully established with the server, but then an
> error occurred during the login process. (provider: TCP Provider, error:
> 0 -
> An existing connection was forcibly closed by the remote host.) "
> The calling page "Default.aspx" only has a GridView control.
> Help please!!!
Does the 2005 beta have an expiration date?
Rick Sawtell
MCT, MCSD, MCDBA
|||Rick,
No I don't think so. I can see the data when i do "Test query" from the
GridView control on the page. My team member can run the app without any
errors.
Thanks
Mumbai_Chef
"Rick Sawtell" wrote:

> "Mumbai_Chef" <MumbaiChef@.discussions.microsoft.com> wrote in message
> news:84F879BA-F54F-420C-8576-0CACE17AB39B@.microsoft.com...
> Does the 2005 beta have an expiration date?
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
|||I've generally seen the "Forcibly Closed" error when the Windows firewall in
XP was blocking the connection but I assume there are other things that
could cause this. Can the same user connect with sqlcmd?
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Mumbai_Chef" <MumbaiChef@.discussions.microsoft.com> wrote in message
news:35E74F79-80C0-4E84-B9AC-2BF569701E59@.microsoft.com...[vbcol=seagreen]
> Rick,
> No I don't think so. I can see the data when i do "Test query" from the
> GridView control on the page. My team member can run the app without any
> errors.
> Thanks
> Mumbai_Chef
>
> "Rick Sawtell" wrote:
|||If the issue is with the firewall than how can another user logged in from my
machine can access the data without any error. I am out of ideas.
Thanks
"Roger Wolter[MSFT]" wrote:

> I've generally seen the "Forcibly Closed" error when the Windows firewall in
> XP was blocking the connection but I assume there are other things that
> could cause this. Can the same user connect with sqlcmd?
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Mumbai_Chef" <MumbaiChef@.discussions.microsoft.com> wrote in message
> news:35E74F79-80C0-4E84-B9AC-2BF569701E59@.microsoft.com...
>
>

Connection error

Hi,
I get the following error when I try to connect to SQL 2005 Beta from VS 2005.
"A connection was successfully established with the server, but then an
error occurred during the login process. (provider: TCP Provider, error: 0 -
An existing connection was forcibly closed by the remote host.) "
The calling page "Default.aspx" only has a GridView control.
Help please!!!"Mumbai_Chef" <MumbaiChef@.discussions.microsoft.com> wrote in message
news:84F879BA-F54F-420C-8576-0CACE17AB39B@.microsoft.com...
> Hi,
> I get the following error when I try to connect to SQL 2005 Beta from VS
> 2005.
> "A connection was successfully established with the server, but then an
> error occurred during the login process. (provider: TCP Provider, error:
> 0 -
> An existing connection was forcibly closed by the remote host.) "
> The calling page "Default.aspx" only has a GridView control.
> Help please!!!
Does the 2005 beta have an expiration date?
Rick Sawtell
MCT, MCSD, MCDBA|||Rick,
No I don't think so. I can see the data when i do "Test query" from the
GridView control on the page. My team member can run the app without any
errors.
Thanks
Mumbai_Chef
"Rick Sawtell" wrote:
> "Mumbai_Chef" <MumbaiChef@.discussions.microsoft.com> wrote in message
> news:84F879BA-F54F-420C-8576-0CACE17AB39B@.microsoft.com...
> > Hi,
> >
> > I get the following error when I try to connect to SQL 2005 Beta from VS
> > 2005.
> >
> > "A connection was successfully established with the server, but then an
> > error occurred during the login process. (provider: TCP Provider, error:
> > 0 -
> > An existing connection was forcibly closed by the remote host.) "
> >
> > The calling page "Default.aspx" only has a GridView control.
> >
> > Help please!!!
> Does the 2005 beta have an expiration date?
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>|||I've generally seen the "Forcibly Closed" error when the Windows firewall in
XP was blocking the connection but I assume there are other things that
could cause this. Can the same user connect with sqlcmd?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Mumbai_Chef" <MumbaiChef@.discussions.microsoft.com> wrote in message
news:35E74F79-80C0-4E84-B9AC-2BF569701E59@.microsoft.com...
> Rick,
> No I don't think so. I can see the data when i do "Test query" from the
> GridView control on the page. My team member can run the app without any
> errors.
> Thanks
> Mumbai_Chef
>
> "Rick Sawtell" wrote:
>> "Mumbai_Chef" <MumbaiChef@.discussions.microsoft.com> wrote in message
>> news:84F879BA-F54F-420C-8576-0CACE17AB39B@.microsoft.com...
>> > Hi,
>> >
>> > I get the following error when I try to connect to SQL 2005 Beta from
>> > VS
>> > 2005.
>> >
>> > "A connection was successfully established with the server, but then an
>> > error occurred during the login process. (provider: TCP Provider,
>> > error:
>> > 0 -
>> > An existing connection was forcibly closed by the remote host.) "
>> >
>> > The calling page "Default.aspx" only has a GridView control.
>> >
>> > Help please!!!
>> Does the 2005 beta have an expiration date?
>>
>> Rick Sawtell
>> MCT, MCSD, MCDBA
>>
>>|||If the issue is with the firewall than how can another user logged in from my
machine can access the data without any error. I am out of ideas.
Thanks
"Roger Wolter[MSFT]" wrote:
> I've generally seen the "Forcibly Closed" error when the Windows firewall in
> XP was blocking the connection but I assume there are other things that
> could cause this. Can the same user connect with sqlcmd?
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Mumbai_Chef" <MumbaiChef@.discussions.microsoft.com> wrote in message
> news:35E74F79-80C0-4E84-B9AC-2BF569701E59@.microsoft.com...
> > Rick,
> > No I don't think so. I can see the data when i do "Test query" from the
> > GridView control on the page. My team member can run the app without any
> > errors.
> >
> > Thanks
> > Mumbai_Chef
> >
> >
> > "Rick Sawtell" wrote:
> >
> >>
> >> "Mumbai_Chef" <MumbaiChef@.discussions.microsoft.com> wrote in message
> >> news:84F879BA-F54F-420C-8576-0CACE17AB39B@.microsoft.com...
> >> > Hi,
> >> >
> >> > I get the following error when I try to connect to SQL 2005 Beta from
> >> > VS
> >> > 2005.
> >> >
> >> > "A connection was successfully established with the server, but then an
> >> > error occurred during the login process. (provider: TCP Provider,
> >> > error:
> >> > 0 -
> >> > An existing connection was forcibly closed by the remote host.) "
> >> >
> >> > The calling page "Default.aspx" only has a GridView control.
> >> >
> >> > Help please!!!
> >>
> >> Does the 2005 beta have an expiration date?
> >>
> >>
> >> Rick Sawtell
> >> MCT, MCSD, MCDBA
> >>
> >>
> >>
> >>
>
>

Connection error

Hi,
I get the following error when I try to connect to SQL 2005 Beta from VS 200
5.
"A connection was successfully established with the server, but then an
error occurred during the login process. (provider: TCP Provider, error: 0 -
An existing connection was forcibly closed by the remote host.) "
The calling page "Default.aspx" only has a GridView control.
Help please!!!"Mumbai_Chef" <MumbaiChef@.discussions.microsoft.com> wrote in message
news:84F879BA-F54F-420C-8576-0CACE17AB39B@.microsoft.com...
> Hi,
> I get the following error when I try to connect to SQL 2005 Beta from VS
> 2005.
> "A connection was successfully established with the server, but then an
> error occurred during the login process. (provider: TCP Provider, error:
> 0 -
> An existing connection was forcibly closed by the remote host.) "
> The calling page "Default.aspx" only has a GridView control.
> Help please!!!
Does the 2005 beta have an expiration date?
Rick Sawtell
MCT, MCSD, MCDBA|||Rick,
No I don't think so. I can see the data when i do "Test query" from the
GridView control on the page. My team member can run the app without any
errors.
Thanks
Mumbai_Chef
"Rick Sawtell" wrote:

> "Mumbai_Chef" <MumbaiChef@.discussions.microsoft.com> wrote in message
> news:84F879BA-F54F-420C-8576-0CACE17AB39B@.microsoft.com...
> Does the 2005 beta have an expiration date?
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>|||I've generally seen the "Forcibly Closed" error when the Windows firewall in
XP was blocking the connection but I assume there are other things that
could cause this. Can the same user connect with sqlcmd?
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Mumbai_Chef" <MumbaiChef@.discussions.microsoft.com> wrote in message
news:35E74F79-80C0-4E84-B9AC-2BF569701E59@.microsoft.com...[vbcol=seagreen]
> Rick,
> No I don't think so. I can see the data when i do "Test query" from the
> GridView control on the page. My team member can run the app without any
> errors.
> Thanks
> Mumbai_Chef
>
> "Rick Sawtell" wrote:
>|||If the issue is with the firewall than how can another user logged in from m
y
machine can access the data without any error. I am out of ideas.
Thanks
"Roger Wolter[MSFT]" wrote:

> I've generally seen the "Forcibly Closed" error when the Windows firewall
in
> XP was blocking the connection but I assume there are other things that
> could cause this. Can the same user connect with sqlcmd?
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Mumbai_Chef" <MumbaiChef@.discussions.microsoft.com> wrote in message
> news:35E74F79-80C0-4E84-B9AC-2BF569701E59@.microsoft.com...
>
>

Connection Error

Error Message:

A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

The error occurs in Visual Studio 2005 v 8.0.50725.42. I have my string in my web.config file. In Visual Studio it doesn't work. When you upload the page it connects and shows the data. Now, I have been several places and been asked, "So what's the issue?" The problem is that I want Visual Studio 2005 to connect so that I can use it to create Gridviews, use the Server Explorer and so on.

Is there an upgrade to VS2005? Is this a known bug? Is there a work-around - a configuration that needs to be setup in the web.config file? I've only just begun my .NET 2.0 experience so type slow and use small words...

Thanks!

I suppouse you are talking about connection string for a database ?, I think you should try this questions in forums about general development or data access, and also give more info about how are you making the connection string, if you are using the "connectionStrings" section and so on.

This forum is only related to Team System and TFS issues, sorry.

Friday, February 24, 2012

Connection error

Hi All
when i try to register an instance of SQL server sometimes it's registered
successfully and sometimes not, giving me the error SQL server Error:17 SQL
server does not exist or access denied.
I installed service pack 3 and i still get error.
Also when i try to add a Data source, i can do it successfully using named
pipes as the network protocol but it fails with TCP/IP.
Thanks for your helpprobably is ur network having probs. check if u can telenet to port 1433. if u can't, check ur network settings, if u still can't telenet, try restart ur syste
-- Nader Galal wrote: --
Hi Al
when i try to register an instance of SQL server sometimes it's registere
successfully and sometimes not, giving me the error SQL server Error:17 SQ
server does not exist or access denied
I installed service pack 3 and i still get error
Also when i try to add a Data source, i can do it successfully using name
pipes as the network protocol but it fails with TCP/IP
Thanks for your hel|||You must have appropriate information to connect to the server, (name or IP,
and port number)...
The server must be listening on the same network protocol that the client is
trying to connect with ( server network utility, and client network
utility).
Lastly you must register the server with a login that is a valid SQL server
login for the server.
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Nader Galal" <ngalal@.hotmail.com> wrote in message
news:uKag%23agyDHA.2720@.TK2MSFTNGP09.phx.gbl...
> Hi All
> when i try to register an instance of SQL server sometimes it's registered
> successfully and sometimes not, giving me the error SQL server Error:17
SQL
> server does not exist or access denied.
> I installed service pack 3 and i still get error.
> Also when i try to add a Data source, i can do it successfully using named
> pipes as the network protocol but it fails with TCP/IP.
> Thanks for your help
>
>

connection broken

Hi,
I,ve tried to manage an SQL Server (MSDE) with Enterprise Manager.
The Server was successfully registered.
But when I try to show the servers properties, or to insert a new login
there is always the following error:
"Error 22528 [SQL-DMO]This server connection has been unexpectedly broke
n
and cannot be reconnected."
What is the problem, and how could I solve it?
Help me, please. Thanks, ChristofWhat OS is it running on? You might want to try running SQL client
configuration utility on the Enterpise Manager PC and see what happens when
you connect with different protocols (eg tcp/ip sockets vs named pipes).
You should also check firewall programs and anti-virus programs to see if
they are blocking named pipes.
****************************************
***************************
Andy S.
MCSE NT/2000, MCDBA SQL 7/2000
andymcdba1@.NOMORESPAM.yahoo.com
Please remove NOMORESPAM before replying.
Always keep your antivirus and Microsoft software
up to date with the latest definitions and product updates.
Be suspicious of every email attachment, I will never send
or post anything other than the text of a http:// link nor
post the link directly to a file for downloading.
This posting is provided "as is" with no warranties
and confers no rights.
****************************************
***************************
"Christof Schdeli" <ch.schaedeli@.gmx.ch> wrote in message
news:ObPgv06fEHA.1972@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I,ve tried to manage an SQL Server (MSDE) with Enterprise Manager.
> The Server was successfully registered.
> But when I try to show the servers properties, or to insert a new login
> there is always the following error:
> "Error 22528 [SQL-DMO]This server connection has been unexpectedly bro
ken
> and cannot be reconnected."
> What is the problem, and how could I solve it?
> Help me, please. Thanks, Christof
>
>|||Hi Andy,
My problem is already solved - I've installed the service-pack 3 of MSDE,
and now, it works fine.
Thanks anyway,
Christof
"Andy Svendsen" <andymcdba1@.NOMORESPAM.yahoo.com> wrote in message
news:eaucXcWgEHA.1196@.TK2MSFTNGP11.phx.gbl...
> What OS is it running on? You might want to try running SQL client
> configuration utility on the Enterpise Manager PC and see what happens
when
> you connect with different protocols (eg tcp/ip sockets vs named pipes).
> You should also check firewall programs and anti-virus programs to see if
> they are blocking named pipes.
> --
> ****************************************
***************************
> Andy S.
> MCSE NT/2000, MCDBA SQL 7/2000
> andymcdba1@.NOMORESPAM.yahoo.com
> Please remove NOMORESPAM before replying.
> Always keep your antivirus and Microsoft software
> up to date with the latest definitions and product updates.
> Be suspicious of every email attachment, I will never send
> or post anything other than the text of a http:// link nor
> post the link directly to a file for downloading.
> This posting is provided "as is" with no warranties
> and confers no rights.
> ****************************************
***************************
> "Christof Schdeli" <ch.schaedeli@.gmx.ch> wrote in message
> news:ObPgv06fEHA.1972@.TK2MSFTNGP09.phx.gbl...
broken[vbcol=seagreen]
>|||Do you resolved them? Please tell me how!
Thanks.
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...

connection broken

Hi,
I,ve tried to manage an SQL Server (MSDE) with Enterprise Manager.
The Server was successfully registered.
But when I try to show the servers properties, or to insert a new login
there is always the following error:
"Error 22528 [SQL-DMO]This server connection has been unexpectedly broken
and cannot be reconnected."
What is the problem, and how could I solve it?
Help me, please. Thanks, Christof
What OS is it running on? You might want to try running SQL client
configuration utility on the Enterpise Manager PC and see what happens when
you connect with different protocols (eg tcp/ip sockets vs named pipes).
You should also check firewall programs and anti-virus programs to see if
they are blocking named pipes.
************************************************** *****************
Andy S.
MCSE NT/2000, MCDBA SQL 7/2000
andymcdba1@.NOMORESPAM.yahoo.com
Please remove NOMORESPAM before replying.
Always keep your antivirus and Microsoft software
up to date with the latest definitions and product updates.
Be suspicious of every email attachment, I will never send
or post anything other than the text of a http:// link nor
post the link directly to a file for downloading.
This posting is provided "as is" with no warranties
and confers no rights.
************************************************** *****************
"Christof Schdeli" <ch.schaedeli@.gmx.ch> wrote in message
news:ObPgv06fEHA.1972@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I,ve tried to manage an SQL Server (MSDE) with Enterprise Manager.
> The Server was successfully registered.
> But when I try to show the servers properties, or to insert a new login
> there is always the following error:
> "Error 22528 [SQL-DMO]This server connection has been unexpectedly broken
> and cannot be reconnected."
> What is the problem, and how could I solve it?
> Help me, please. Thanks, Christof
>
>
|||Hi Andy,
My problem is already solved - I've installed the service-pack 3 of MSDE,
and now, it works fine.
Thanks anyway,
Christof
"Andy Svendsen" <andymcdba1@.NOMORESPAM.yahoo.com> wrote in message
news:eaucXcWgEHA.1196@.TK2MSFTNGP11.phx.gbl...
> What OS is it running on? You might want to try running SQL client
> configuration utility on the Enterpise Manager PC and see what happens
when[vbcol=seagreen]
> you connect with different protocols (eg tcp/ip sockets vs named pipes).
> You should also check firewall programs and anti-virus programs to see if
> they are blocking named pipes.
> --
> ************************************************** *****************
> Andy S.
> MCSE NT/2000, MCDBA SQL 7/2000
> andymcdba1@.NOMORESPAM.yahoo.com
> Please remove NOMORESPAM before replying.
> Always keep your antivirus and Microsoft software
> up to date with the latest definitions and product updates.
> Be suspicious of every email attachment, I will never send
> or post anything other than the text of a http:// link nor
> post the link directly to a file for downloading.
> This posting is provided "as is" with no warranties
> and confers no rights.
> ************************************************** *****************
> "Christof Schdeli" <ch.schaedeli@.gmx.ch> wrote in message
> news:ObPgv06fEHA.1972@.TK2MSFTNGP09.phx.gbl...
broken
>
|||Do you resolved them? Please tell me how!
Thanks.
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...