Showing posts with label group. Show all posts
Showing posts with label group. Show all posts

Wednesday, March 21, 2012

ODBC connection Failure

We have group added in SQL Server, this group had a 5 AD accounts. We grante
d
access to the SQL Server to that group.
Two people able to successfully created ODBC connection from work station A.
Other three was not able to create ODBC connection fron any workstation. It
is working for all other people from any workstation, only these three peopl
e
had a problem from any workstation:
The error meaggage in SQL Server Error Log:
Message
The login packet used to open the connection is structurally invalid; the
connection has been closed. Please contact the vendor of the client library.
[CLIENT: 192.168.149.4]
Message
Error: 17832, Severity: 20, State: 8.
any help will be appreciated.THis is SQL Server 2005 SP1.
"Sri" wrote:

> We have group added in SQL Server, this group had a 5 AD accounts. We gran
ted
> access to the SQL Server to that group.
> Two people able to successfully created ODBC connection from work station
A.
> Other three was not able to create ODBC connection fron any workstation. I
t
> is working for all other people from any workstation, only these three peo
ple
> had a problem from any workstation:
> The error meaggage in SQL Server Error Log:
> Message
> The login packet used to open the connection is structurally invalid; the
> connection has been closed. Please contact the vendor of the client librar
y.
> [CLIENT: 192.168.149.4]
> Message
> Error: 17832, Severity: 20, State: 8.
> any help will be appreciated.|||It looks more likely related to PC and not the people in particular.
Did you check MDAC on the machines? You can use component checker to
verity the MDAC versions and installations:
You can download the tool from:
http://msdn2.microsoft.com/en-us/data/aa937730.aspx
Have you looked for other configuration, service pack differences for
the PCs?
-Sue
On Mon, 12 Mar 2007 10:51:33 -0700, Sri
<Sri@.discussions.microsoft.com> wrote:

>We have group added in SQL Server, this group had a 5 AD accounts. We grant
ed
>access to the SQL Server to that group.
>Two people able to successfully created ODBC connection from work station A
.
>Other three was not able to create ODBC connection fron any workstation. It
>is working for all other people from any workstation, only these three peop
le
>had a problem from any workstation:
>The error meaggage in SQL Server Error Log:
>Message
>The login packet used to open the connection is structurally invalid; the
>connection has been closed. Please contact the vendor of the client library
.
>[CLIENT: 192.168.149.4]
>Message
>Error: 17832, Severity: 20, State: 8.
>any help will be appreciated.

Monday, March 19, 2012

ODBC BCP Error Handling in C++

(Please let me know if there is a better group to post this on...)
I have written a C++ program that BCP's data into SQL Server using ODBC.
I'm currently at the point that I am testing worst-case scenarios. In the
scenario that while the BCP is running, I pull the network cable from SQL
server, I get failed calls to bcp_sendrow, but I am unable to get details on
the error. I have tried calling SQLGetDiagRec with handle types of
SQL_HANDLE_ENV, SQL_HANDLE_DBC, and SQL_HANDLE_STMT.
Any suggestions would be appreciated.
Thanks.
-Thomas
I figured it out myself. In case anyone is interested, here is how to
determine whether the connection to the database is still alive...
SQLHDBC m_hConn;
...
SQLINTEGER siDead = SQL_CD_FALSE;
::SQLGetConnectAttr(m_hConn
,SQL_ATTR_CONNECTION_DEAD
,&siDead //SQL_CD_TRUE or SQL_CD_FALSE
,sizeof(siDead)
,NULL);
if (siDead == SQL_CD_TRUE)
{
//Database connection is dead
}

ODBC BCP Error Handling in C++

(Please let me know if there is a better group to post this on...)
I have written a C++ program that BCP's data into SQL Server using ODBC.
I'm currently at the point that I am testing worst-case scenarios. In the
scenario that while the BCP is running, I pull the network cable from SQL
server, I get failed calls to bcp_sendrow, but I am unable to get details on
the error. I have tried calling SQLGetDiagRec with handle types of
SQL_HANDLE_ENV, SQL_HANDLE_DBC, and SQL_HANDLE_STMT.
Any suggestions would be appreciated.
Thanks.
-ThomasI figured it out myself. In case anyone is interested, here is how to
determine whether the connection to the database is still alive...
SQLHDBC m_hConn;
..
SQLINTEGER siDead = SQL_CD_FALSE;
::SQLGetConnectAttr(m_hConn
,SQL_ATTR_CONNECTION_DEAD
,&siDead //SQL_CD_TRUE or SQL_CD_FALSE
,sizeof(siDead)
,NULL);
if (siDead == SQL_CD_TRUE)
{
//Database connection is dead
}

Monday, March 12, 2012

ODBC and MSDE

Hello,
I'm not sure if it is right group for this question, but I hope that
I'll get help here...
I'm using MSDE to store data for my application. And I'm having such
problem. I'm creating a table in DB for string connection information:
CREATE TABLE sql (
action_id int NOT NULL default '0',
database_name varchar(20) NOT NULL default '',
username varchar(15) NOT NULL default '',
password varchar(15) NOT NULL default '',
PRIMARY KEY (action_id)
);
Field 'database_name' stands for the DB name used by ODBC (In my Java
application I'm using ODBC, to connect to particular DB). So when I'm
adding a record to this table, for instance:
1, "MySQL", "root", "password"
ODBC || MSDE || JDBC changes the values by adding free space to fill all
the field's spaces (Instead of "MySQL" it adds "MySQL "). It
seems like some component doesn't understand that I'm using varchar(20),
not char.
For instance, when I'm using MySQL DB server, such problem doesn't
introduce itself... Does anyone know how to manage this?
Thank you,
Audrius
Audrius wrote:
> Hello,
> I'm not sure if it is right group for this question, but I hope that
> I'll get help here...
> I'm using MSDE to store data for my application. And I'm having such
> problem. I'm creating a table in DB for string connection information:
> CREATE TABLE sql (
> action_id int NOT NULL default '0',
> database_name varchar(20) NOT NULL default '',
> username varchar(15) NOT NULL default '',
> password varchar(15) NOT NULL default '',
> PRIMARY KEY (action_id)
> );
> Field 'database_name' stands for the DB name used by ODBC (In my Java
> application I'm using ODBC, to connect to particular DB). So when I'm
> adding a record to this table, for instance:
> 1, "MySQL", "root", "password"
> ODBC || MSDE || JDBC changes the values by adding free space to fill all
> the field's spaces (Instead of "MySQL" it adds "MySQL "). It
> seems like some component doesn't understand that I'm using varchar(20),
> not char.
> For instance, when I'm using MySQL DB server, such problem doesn't
> introduce itself... Does anyone know how to manage this?
> Thank you,
> Audrius
When I tried to insert data into MSDE table using console, everything
worked fine. The data occupies exactly as it should ("MySQL" - 5
symbols). But when I do this using ODBC from my application, it doesn't
work right. Can anyone suggest me a solution?
|||Audrius wrote:
> Audrius wrote:
>
> When I tried to insert data into MSDE table using console, everything
> worked fine. The data occupies exactly as it should ("MySQL" - 5
> symbols). But when I do this using ODBC from my application, it doesn't
> work right. Can anyone suggest me a solution?
The problem was solved.

ODBC and MSDE

Hello,
I'm not sure if it is right group for this question, but I hope that
I'll get help here...
I'm using MSDE to store data for my application. And I'm having such
problem. I'm creating a table in DB for string connection information:
CREATE TABLE sql (
action_id int NOT NULL default '0',
database_name varchar(20) NOT NULL default '',
username varchar(15) NOT NULL default '',
password varchar(15) NOT NULL default '',
PRIMARY KEY (action_id)
);
Field 'database_name' stands for the DB name used by ODBC (In my Java
application I'm using ODBC, to connect to particular DB). So when I'm
adding a record to this table, for instance:
1, "MySQL", "root", "password"
ODBC || MSDE || JDBC changes the values by adding free space to fill all
the field's spaces (Instead of "MySQL" it adds "MySQL "). It
seems like some component doesn't understand that I'm using varchar(20),
not char.
For instance, when I'm using MySQL DB server, such problem doesn't
introduce itself... Does anyone know how to manage this?
Thank you,
Audrius
Audrius wrote:
> Hello,
> I'm not sure if it is right group for this question, but I hope that
> I'll get help here...
> I'm using MSDE to store data for my application. And I'm having such
> problem. I'm creating a table in DB for string connection information:
> CREATE TABLE sql (
> action_id int NOT NULL default '0',
> database_name varchar(20) NOT NULL default '',
> username varchar(15) NOT NULL default '',
> password varchar(15) NOT NULL default '',
> PRIMARY KEY (action_id)
> );
> Field 'database_name' stands for the DB name used by ODBC (In my Java
> application I'm using ODBC, to connect to particular DB). So when I'm
> adding a record to this table, for instance:
> 1, "MySQL", "root", "password"
> ODBC || MSDE || JDBC changes the values by adding free space to fill all
> the field's spaces (Instead of "MySQL" it adds "MySQL "). It
> seems like some component doesn't understand that I'm using varchar(20),
> not char.
> For instance, when I'm using MySQL DB server, such problem doesn't
> introduce itself... Does anyone know how to manage this?
> Thank you,
> Audrius
When I tried to insert data into MSDE table using console, everything
worked fine. The data occupies exactly as it should ("MySQL" - 5
symbols). But when I do this using ODBC from my application, it doesn't
work right. Can anyone suggest me a solution?
|||Audrius wrote:
> Audrius wrote:
>
> When I tried to insert data into MSDE table using console, everything
> worked fine. The data occupies exactly as it should ("MySQL" - 5
> symbols). But when I do this using ODBC from my application, it doesn't
> work right. Can anyone suggest me a solution?
The problem was solved.

ODBC and MSDE

Hello,

I'm not sure if it is right group for this question, but I hope that
I'll get help here...

I'm using MSDE to store data for my application. And I'm having such
problem. I'm creating a table in DB for string connection information:

CREATE TABLE sql (
action_id int NOT NULL default '0',
database_name varchar(20) NOT NULL default '',
username varchar(15) NOT NULL default '',
password varchar(15) NOT NULL default '',
PRIMARY KEY (action_id)
);

Field 'database_name' stands for the DB name used by ODBC (In my Java
application I'm using ODBC, to connect to particular DB). So when I'm
adding a record to this table, for instance:
1, "MySQL", "root", "password"
ODBC || MSDE || JDBC changes the values by adding free space to fill
all the field's spaces (Instead of "MySQL" it adds "MySQL
"). It seems like some component doesn't understand that I'm using
varchar(20), not char.

For instance, when I'm using MySQL DB server, such problem doesn't
introduce itself... Does anyone know how to manage this?

Thank you,
AudriusWhen I tried to insert data into MSDE table using console, everything
worked fine. The data occupies exactly as it should ("MySQL" - 5
symbols). But when I do this using ODBC from my application, it doesn't
work right. Can anyone suggest me a solution?|||Audrius (audrius.peseckis@.gmail.com) writes:
> I'm not sure if it is right group for this question, but I hope that
> I'll get help here...
> I'm using MSDE to store data for my application. And I'm having such
> problem. I'm creating a table in DB for string connection information:
> CREATE TABLE sql (
> action_id int NOT NULL default '0',
> database_name varchar(20) NOT NULL default '',
> username varchar(15) NOT NULL default '',
> password varchar(15) NOT NULL default '',
> PRIMARY KEY (action_id)
> );
> Field 'database_name' stands for the DB name used by ODBC (In my Java
> application I'm using ODBC, to connect to particular DB). So when I'm
> adding a record to this table, for instance:
> 1, "MySQL", "root", "password"
> ODBC || MSDE || JDBC changes the values by adding free space to fill
> all the field's spaces (Instead of "MySQL" it adds "MySQL
> "). It seems like some component doesn't understand that I'm using
> varchar(20), not char.

It appears that your app passes "MySQL ". In such case,
SQL Server will store the trailing spaces when the ANSI_PADDING
option is in effect, which it is by default when you use ODBC. You
need to trim the trailing spaces somewhere on the line.

There are a few more possibilities, but I can't really speculate
about them, as you did not provide any code.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Yes, it solved the problem. ODBC was set to use ANSI padding by
default. Your reply saved me a lot of time, thank you.

Audrius|||Audrius (audrius.peseckis@.gmail.com) writes:
> Yes, it solved the problem. ODBC was set to use ANSI padding by
> default. Your reply saved me a lot of time, thank you.

While turning of ANSI_PADDING may solve the problem, be aware of
that there are features in SQL Server that require ANSI_PADDING to
be on. In SQL 2000 that is indexed views and indexes on computed
columns. I believe there are more features in SQL 2005.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

ODBC and MSDE

Hello,
I'm not sure if it is right group for this question, but I hope that
I'll get help here...
I'm using MSDE to store data for my application. And I'm having such
problem. I'm creating a table in DB for string connection information:
CREATE TABLE sql (
action_id int NOT NULL default '0',
database_name varchar(20) NOT NULL default '',
username varchar(15) NOT NULL default '',
password varchar(15) NOT NULL default '',
PRIMARY KEY (action_id)
);
Field 'database_name' stands for the DB name used by ODBC (In my Java
application I'm using ODBC, to connect to particular DB). So when I'm
adding a record to this table, for instance:
1, "MySQL", "root", "password"
ODBC || MSDE || JDBC changes the values by adding free space to fill all
the field's spaces (Instead of "MySQL" it adds "MySQL "). It
seems like some component doesn't understand that I'm using varchar(20),
not char.
For instance, when I'm using mysql DB server, such problem doesn't
introduce itself... Does anyone know how to manage this?
Thank you,
AudriusAudrius wrote:
> Hello,
> I'm not sure if it is right group for this question, but I hope that
> I'll get help here...
> I'm using MSDE to store data for my application. And I'm having such
> problem. I'm creating a table in DB for string connection information:
> CREATE TABLE sql (
> action_id int NOT NULL default '0',
> database_name varchar(20) NOT NULL default '',
> username varchar(15) NOT NULL default '',
> password varchar(15) NOT NULL default '',
> PRIMARY KEY (action_id)
> );
> Field 'database_name' stands for the DB name used by ODBC (In my Java
> application I'm using ODBC, to connect to particular DB). So when I'm
> adding a record to this table, for instance:
> 1, "MySQL", "root", "password"
> ODBC || MSDE || JDBC changes the values by adding free space to fill all
> the field's spaces (Instead of "MySQL" it adds "MySQL "). It
> seems like some component doesn't understand that I'm using varchar(20),
> not char.
> For instance, when I'm using mysql DB server, such problem doesn't
> introduce itself... Does anyone know how to manage this?
> Thank you,
> Audrius
When I tried to insert data into MSDE table using console, everything
worked fine. The data occupies exactly as it should ("MySQL" - 5
symbols). But when I do this using ODBC from my application, it doesn't
work right. Can anyone suggest me a solution?|||Audrius wrote:
> Audrius wrote:
>
>
> When I tried to insert data into MSDE table using console, everything
> worked fine. The data occupies exactly as it should ("MySQL" - 5
> symbols). But when I do this using ODBC from my application, it doesn't
> work right. Can anyone suggest me a solution?
The problem was solved.

Friday, February 24, 2012

Obsolete technology - dblibrary

Hello!
I post this question again, because three days after I posted it I could not
see it in the news group.
So...
In my application I need to use extended stored procedures.
Developing these extended stored procedures I use the "dblibrary APIs" to
access MS SQL Server 2000.
As far as I understand /reading articles in MSDN/, Microsoft declares its
intention not to support dblibrary in future.
Which is the recommended method to access MS SQL Server?
Thank you!
OLE-DB or ODBC are both still supported API's for SQL Server if you're
talking about using xp's.
Brian
"ggeshev" <ggeshev@.tonegan.bg> wrote in message
news:OpTELgKPEHA.1392@.TK2MSFTNGP09.phx.gbl...
> Hello!
> I post this question again, because three days after I posted it I could
not
> see it in the news group.
> So...
> In my application I need to use extended stored procedures.
> Developing these extended stored procedures I use the "dblibrary APIs" to
> access MS SQL Server 2000.
> As far as I understand /reading articles in MSDN/, Microsoft declares its
> intention not to support dblibrary in future.
> Which is the recommended method to access MS SQL Server?
> Thank you!
>

Obsolete technology - dblibrary

Hello!
I post this question again, because three days after I posted it I could not
see it in the news group.
So...
In my application I need to use extended stored procedures.
Developing these extended stored procedures I use the "dblibrary APIs" to
access MS SQL Server 2000.
As far as I understand /reading articles in MSDN/, Microsoft declares its
intention not to support dblibrary in future.
Which is the recommended method to access MS SQL Server?
Thank you!OLE-DB or ODBC are both still supported API's for SQL Server if you're
talking about using xp's.
--
Brian
"ggeshev" <ggeshev@.tonegan.bg> wrote in message
news:OpTELgKPEHA.1392@.TK2MSFTNGP09.phx.gbl...
> Hello!
> I post this question again, because three days after I posted it I could
not
> see it in the news group.
> So...
> In my application I need to use extended stored procedures.
> Developing these extended stored procedures I use the "dblibrary APIs" to
> access MS SQL Server 2000.
> As far as I understand /reading articles in MSDN/, Microsoft declares its
> intention not to support dblibrary in future.
> Which is the recommended method to access MS SQL Server?
> Thank you!
>

Monday, February 20, 2012

Obsolete technology - dblibrary

Hello!
I post this question again, because three days after I posted it I could not
see it in the news group.
So...
In my application I need to use extended stored procedures.
Developing these extended stored procedures I use the "dblibrary APIs" to
access MS SQL Server 2000.
As far as I understand /reading articles in MSDN/, Microsoft declares its
intention not to support dblibrary in future.
Which is the recommended method to access MS SQL Server?
Thank you!OLE-DB or ODBC are both still supported API's for SQL Server if you're
talking about using xp's.
Brian
"ggeshev" <ggeshev@.tonegan.bg> wrote in message
news:OpTELgKPEHA.1392@.TK2MSFTNGP09.phx.gbl...
> Hello!
> I post this question again, because three days after I posted it I could
not
> see it in the news group.
> So...
> In my application I need to use extended stored procedures.
> Developing these extended stored procedures I use the "dblibrary APIs" to
> access MS SQL Server 2000.
> As far as I understand /reading articles in MSDN/, Microsoft declares its
> intention not to support dblibrary in future.
> Which is the recommended method to access MS SQL Server?
> Thank you!
>