Showing posts with label tables. Show all posts
Showing posts with label tables. Show all posts

Tuesday, March 27, 2012

Error 17883 forcing shutdown and hard boot

Hi,
We have a SQL 2000 server on a 8 processor Dell server
that uses tables from another server (Linked Server).
Periodically it hangs up locking out out our.NET users. It
fails to display the linked server tables on EM.
The SQL logs show thes two lines:
The Scheduler 7 appears to be hung. SPID 0, ECID 0, UMS
Context 0x03EFC168.
Error: 17883, Severity: 1, State: 0
The server also shows a bunch of Application Pop-ups that
say:
"Application Popup error: SQL Server OLEDB provider
support error. Unable to load SQL Server OLEDB provider
resource dll."
Can someone help with a fix? Its a little tiresome to have
to shutdown and restart the server (which takes about 10
minutes).
Thanks very much.
Sam AbrahamCheck if this article is helpful:
http://support.microsoft.com/defaul...b;EN-US;810885.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Sam Abraham" <sabraham@.state.pa.us> wrote in message
news:1cb101c3e02d$4428f1b0$a601280a@.phx.gbl...
quote:

> Hi,
> We have a SQL 2000 server on a 8 processor Dell server
> that uses tables from another server (Linked Server).
> Periodically it hangs up locking out out our.NET users. It
> fails to display the linked server tables on EM.
> The SQL logs show thes two lines:
> The Scheduler 7 appears to be hung. SPID 0, ECID 0, UMS
> Context 0x03EFC168.
> Error: 17883, Severity: 1, State: 0
> The server also shows a bunch of Application Pop-ups that
> say:
> "Application Popup error: SQL Server OLEDB provider
> support error. Unable to load SQL Server OLEDB provider
> resource dll."
>
> Can someone help with a fix? Its a little tiresome to have
> to shutdown and restart the server (which takes about 10
> minutes).
>
> Thanks very much.
> Sam Abraham
|||Thanks for trying Dejan but the knowledge Base Article is
no longer available.
Sam
quote:

>--Original Message--
>Check if this article is helpful:
>http://support.microsoft.com/default.aspx?scid=kb;EN-

US;810885.
quote:

>--
>Dejan Sarka, SQL Server MVP
>Associate Mentor
>Solid Quality Learning
>More than just Training
>www.SolidQualityLearning.com
>"Sam Abraham" <sabraham@.state.pa.us> wrote in message
>news:1cb101c3e02d$4428f1b0$a601280a@.phx.gbl...
It[QUOTE]
that[QUOTE]
have[QUOTE]
>
>.
>
|||Hello Sam,
Error 17883 is not correctly displayed in earlier build of SQL 2K SP3. You
might need the Hotfix mentioed in
FIX: Error 17883 May Display Message Text That Is Not Correct
http://support.microsoft.com/defaul...kb;en-us;816840
However, that would just allow SQL Server to display the correct error
message.. They are several causes of this kind of error and
its required to analyse the errorlogs,event logs and mini dumps to narrow
down the actual cause of this problem you are having.
Looking at the nature of this issue, it would require intensive
troubleshooting which would be done quickly and effectively with direct
assistance from a Microsoft Support Professional through Microsoft Product
Support Services. You can contact Microsoft Product Support directly to
discuss additional support options you may have available, by contacting us
at 1-(800)936-5800 or by choosing one of the options listed at
http://support.microsoft.com/defaul...d=sz;en-us;top. If this is not
an urgent issue and your would like us to create an incident for you and
have Microsoft Customer Service Representative contact you directly,
please send email to (remove "online." from this no Spam email address):
mailto:dscommhf@.online.microsoft.com with the following information,
*Include "Followup: <Tomcat IssueID>" in the email Subject.
*Location of the post
*Subject Line
*First Name, Last Name
*MSDN Subscriber ID
*Company name (if any)
*Phone number
*e-mail address
Thanks for using MSDN Managed Newsgroup.
Vikrant Dalwale
Microsoft SQL Server Support Professional
This posting is provided "AS IS" with no warranties, and confers no rights.
Get secure !! For info, please visit http://www.microsoft.com/security.
Please reply to Newsgroups only.
| Content-Class: urn:content-classes:message
| From: "Sam Abraham" <sabraham@.state.pa.us>
| Sender: "Sam Abraham" <sabraham@.state.pa.us>
| Subject: Error 17883 forcing shutdown and hard boot
| Date: Wed, 21 Jan 2004 06:45:51 -0800
| Lines: 29
| Message-ID: <1cb101c3e02d$4428f1b0$a601280a@.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcPgLUQog4wHY5XDQDqvTUZLq4jvlA==
| Newsgroups: microsoft.public.sqlserver.server
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.sqlserver.server:325329
| NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| Hi,
|
| We have a SQL 2000 server on a 8 processor Dell server
| that uses tables from another server (Linked Server).
| Periodically it hangs up locking out out our.NET users. It
| fails to display the linked server tables on EM.
| The SQL logs show thes two lines:
|
| The Scheduler 7 appears to be hung. SPID 0, ECID 0, UMS
| Context 0x03EFC168.
|
| Error: 17883, Severity: 1, State: 0
|
| The server also shows a bunch of Application Pop-ups that
| say:
|
| "Application Popup error: SQL Server OLEDB provider
| support error. Unable to load SQL Server OLEDB provider
| resource dll."
|
|
| Can someone help with a fix? Its a little tiresome to have
| to shutdown and restart the server (which takes about 10
| minutes).
|
|
| Thanks very much.
|
| Sam Abraham
||||The link works. Maybe you had some temporary connection problem?
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
<anonymous@.discussions.microsoft.com> wrote in message
news:1c2701c3e04a$a5766f70$a001280a@.phx.gbl...[QUOTE]
> Thanks for trying Dejan but the knowledge Base Article is
> no longer available.
> Sam
> US;810885.
> It
> that
> have

Error 17883 forcing shutdown and hard boot

Hi,
We have a SQL 2000 server on a 8 processor Dell server
that uses tables from another server (Linked Server).
Periodically it hangs up locking out out our.NET users. It
fails to display the linked server tables on EM.
The SQL logs show thes two lines:
The Scheduler 7 appears to be hung. SPID 0, ECID 0, UMS
Context 0x03EFC168.
Error: 17883, Severity: 1, State: 0
The server also shows a bunch of Application Pop-ups that
say:
"Application Popup error: SQL Server OLEDB provider
support error. Unable to load SQL Server OLEDB provider
resource dll."
Can someone help with a fix? Its a little tiresome to have
to shutdown and restart the server (which takes about 10
minutes).
Thanks very much.
Sam AbrahamCheck if this article is helpful:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;810885.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Sam Abraham" <sabraham@.state.pa.us> wrote in message
news:1cb101c3e02d$4428f1b0$a601280a@.phx.gbl...
> Hi,
> We have a SQL 2000 server on a 8 processor Dell server
> that uses tables from another server (Linked Server).
> Periodically it hangs up locking out out our.NET users. It
> fails to display the linked server tables on EM.
> The SQL logs show thes two lines:
> The Scheduler 7 appears to be hung. SPID 0, ECID 0, UMS
> Context 0x03EFC168.
> Error: 17883, Severity: 1, State: 0
> The server also shows a bunch of Application Pop-ups that
> say:
> "Application Popup error: SQL Server OLEDB provider
> support error. Unable to load SQL Server OLEDB provider
> resource dll."
>
> Can someone help with a fix? Its a little tiresome to have
> to shutdown and restart the server (which takes about 10
> minutes).
>
> Thanks very much.
> Sam Abraham|||Thanks for trying Dejan but the knowledge Base Article is
no longer available.
Sam
>--Original Message--
>Check if this article is helpful:
>http://support.microsoft.com/default.aspx?scid=kb;EN-
US;810885.
>--
>Dejan Sarka, SQL Server MVP
>Associate Mentor
>Solid Quality Learning
>More than just Training
>www.SolidQualityLearning.com
>"Sam Abraham" <sabraham@.state.pa.us> wrote in message
>news:1cb101c3e02d$4428f1b0$a601280a@.phx.gbl...
>> Hi,
>> We have a SQL 2000 server on a 8 processor Dell server
>> that uses tables from another server (Linked Server).
>> Periodically it hangs up locking out out our.NET users.
It
>> fails to display the linked server tables on EM.
>> The SQL logs show thes two lines:
>> The Scheduler 7 appears to be hung. SPID 0, ECID 0, UMS
>> Context 0x03EFC168.
>> Error: 17883, Severity: 1, State: 0
>> The server also shows a bunch of Application Pop-ups
that
>> say:
>> "Application Popup error: SQL Server OLEDB provider
>> support error. Unable to load SQL Server OLEDB provider
>> resource dll."
>>
>> Can someone help with a fix? Its a little tiresome to
have
>> to shutdown and restart the server (which takes about 10
>> minutes).
>>
>> Thanks very much.
>> Sam Abraham
>
>.
>|||Hello Sam,
Error 17883 is not correctly displayed in earlier build of SQL 2K SP3. You
might need the Hotfix mentioed in
FIX: Error 17883 May Display Message Text That Is Not Correct
http://support.microsoft.com/default.aspx?scid=kb;en-us;816840
However, that would just allow SQL Server to display the correct error
message.. They are several causes of this kind of error and
its required to analyse the errorlogs,event logs and mini dumps to narrow
down the actual cause of this problem you are having.
Looking at the nature of this issue, it would require intensive
troubleshooting which would be done quickly and effectively with direct
assistance from a Microsoft Support Professional through Microsoft Product
Support Services. You can contact Microsoft Product Support directly to
discuss additional support options you may have available, by contacting us
at 1-(800)936-5800 or by choosing one of the options listed at
http://support.microsoft.com/default.aspx?scid=sz;en-us;top. If this is not
an urgent issue and your would like us to create an incident for you and
have Microsoft Customer Service Representative contact you directly,
please send email to (remove "online." from this no Spam email address):
mailto:dscommhf@.online.microsoft.com with the following information,
*Include "Followup: <Tomcat IssueID>" in the email Subject.
*Location of the post
*Subject Line
*First Name, Last Name
*MSDN Subscriber ID
*Company name (if any)
*Phone number
*e-mail address
Thanks for using MSDN Managed Newsgroup.
Vikrant Dalwale
Microsoft SQL Server Support Professional
This posting is provided "AS IS" with no warranties, and confers no rights.
Get secure !! For info, please visit http://www.microsoft.com/security.
Please reply to Newsgroups only.
--
| Content-Class: urn:content-classes:message
| From: "Sam Abraham" <sabraham@.state.pa.us>
| Sender: "Sam Abraham" <sabraham@.state.pa.us>
| Subject: Error 17883 forcing shutdown and hard boot
| Date: Wed, 21 Jan 2004 06:45:51 -0800
| Lines: 29
| Message-ID: <1cb101c3e02d$4428f1b0$a601280a@.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcPgLUQog4wHY5XDQDqvTUZLq4jvlA==| Newsgroups: microsoft.public.sqlserver.server
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.sqlserver.server:325329
| NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| Hi,
|
| We have a SQL 2000 server on a 8 processor Dell server
| that uses tables from another server (Linked Server).
| Periodically it hangs up locking out out our.NET users. It
| fails to display the linked server tables on EM.
| The SQL logs show thes two lines:
|
| The Scheduler 7 appears to be hung. SPID 0, ECID 0, UMS
| Context 0x03EFC168.
|
| Error: 17883, Severity: 1, State: 0
|
| The server also shows a bunch of Application Pop-ups that
| say:
|
| "Application Popup error: SQL Server OLEDB provider
| support error. Unable to load SQL Server OLEDB provider
| resource dll."
|
|
| Can someone help with a fix? Its a little tiresome to have
| to shutdown and restart the server (which takes about 10
| minutes).
|
|
| Thanks very much.
|
| Sam Abraham
||||The link works. Maybe you had some temporary connection problem?
--
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
<anonymous@.discussions.microsoft.com> wrote in message
news:1c2701c3e04a$a5766f70$a001280a@.phx.gbl...
> Thanks for trying Dejan but the knowledge Base Article is
> no longer available.
> Sam
> >--Original Message--
> >Check if this article is helpful:
> >http://support.microsoft.com/default.aspx?scid=kb;EN-
> US;810885.
> >
> >--
> >Dejan Sarka, SQL Server MVP
> >Associate Mentor
> >Solid Quality Learning
> >More than just Training
> >www.SolidQualityLearning.com
> >
> >"Sam Abraham" <sabraham@.state.pa.us> wrote in message
> >news:1cb101c3e02d$4428f1b0$a601280a@.phx.gbl...
> >> Hi,
> >>
> >> We have a SQL 2000 server on a 8 processor Dell server
> >> that uses tables from another server (Linked Server).
> >> Periodically it hangs up locking out out our.NET users.
> It
> >> fails to display the linked server tables on EM.
> >> The SQL logs show thes two lines:
> >>
> >> The Scheduler 7 appears to be hung. SPID 0, ECID 0, UMS
> >> Context 0x03EFC168.
> >>
> >> Error: 17883, Severity: 1, State: 0
> >>
> >> The server also shows a bunch of Application Pop-ups
> that
> >> say:
> >>
> >> "Application Popup error: SQL Server OLEDB provider
> >> support error. Unable to load SQL Server OLEDB provider
> >> resource dll."
> >>
> >>
> >> Can someone help with a fix? Its a little tiresome to
> have
> >> to shutdown and restart the server (which takes about 10
> >> minutes).
> >>
> >>
> >> Thanks very much.
> >>
> >> Sam Abraham
> >
> >
> >.
> >

Thursday, March 22, 2012

Error 15023 : User or role "abc" already exists in current database

I have restored a database which has tables belonging to a
particular user account created. However, after
restoration, I am not able to see the user account in the
User/Logins item and not able to create a new account with
the same name and making it the db_owner at the same time.
The system gives me this error.
Using sp_helpusers for this database, I realised that
there is a user account with the name "abc" but there is
no value in the "loginName" & "DefDBName" fields.
Please advise how I can sync this.
Thanks.It sounds as though the user is orphaned
Exec sp_change_users_login 'Report'
will show you this info
You can use the 'Update_One' parameter to match things up
OR you could simply use
Exec sp_revokedbaccess 'Name in DB'
EXEC sp_grantdbaccess [@.loginame =] 'login'
[,[@.name_in_db =] 'name_in_db' [OUTPUT]]
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Dara" <dara.lim@.ogilvy.com> wrote in message
news:075e01c35bf0$2360f020$a501280a@.phx.gbl...
> I have restored a database which has tables belonging to a
> particular user account created. However, after
> restoration, I am not able to see the user account in the
> User/Logins item and not able to create a new account with
> the same name and making it the db_owner at the same time.
> The system gives me this error.
> Using sp_helpusers for this database, I realised that
> there is a user account with the name "abc" but there is
> no value in the "loginName" & "DefDBName" fields.
> Please advise how I can sync this.
> Thanks.|||Hi Dara,
If you have a login for that user on your server you can use the
sp_change_users_login stored procedure to fix your problems. See Books
Online for the details.
--
Jacco Schalkwijk MCDBA, MCSD, MCSE
Database Administrator
Eurostop Ltd.
"Dara" <dara.lim@.ogilvy.com> wrote in message
news:075e01c35bf0$2360f020$a501280a@.phx.gbl...
> I have restored a database which has tables belonging to a
> particular user account created. However, after
> restoration, I am not able to see the user account in the
> User/Logins item and not able to create a new account with
> the same name and making it the db_owner at the same time.
> The system gives me this error.
> Using sp_helpusers for this database, I realised that
> there is a user account with the name "abc" but there is
> no value in the "loginName" & "DefDBName" fields.
> Please advise how I can sync this.
> Thanks.

Sunday, March 11, 2012

Error 1105 When Using SQLMaint To Reindex Tables

I have a standard reorganise/reindex job running against a 32GB database on SQl Srever 2000. When trying to run the job it fails and returns Error 1105 <'PRIMARY' filegroup is full>. What's confusing me is that I have 53GB free on the drive on which my Primary file group sits.

Has anyone else come accross this problem when trying to set up a regular reindex job?

(more detail) the maintenance plan only includes the reorganisation/reindex job, no other jobs - including backing up the DB - are included. The DB in question is the only DB on the server: it's a test server.Sounds like you've restricted the file growth size...go to the database properties and tell us what it's set to...|||Brett,

You were right, log size was being restricted. Funny how you miss the obvious stuff.....

Many Thanks

Matthew

error 1069: The service did not start due to logon problems

The local sql server that was working fine earlier does not start now. I have already created tables and accessed them using stored procedures.

I get an error 1069: The service did not start due to logon problems. I have only changed my domain password. I do not remember what authentication I chose for log on.

Any suggestions would be helpful.

Thanks

try this article:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q282254

error 1069: The service did not start due to logon problems

The local sql server that was working fine earlier does not start now. I have already created tables and accessed them using stored procedures.

I get an error 1069: The service did not start due to logon problems. I have only changed my domain password. I do not remember what authentication I chose for log on.

Any suggestions would be helpful.

Thanks

try this article:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q282254

Friday, March 9, 2012

Error 0xc0202009 for importing access97 into sql

We have an Access97 database with 122 tables. I try to use import and export wizard to import the data from access into SQL 2005 database. I find an interesting problem. When select all tables, the wizard give following errors:

Pre-execute (Error)
Messages
Error 0xc0202009: {DBD1EAB5-7865-4B89-A7BB-DDC8507D8119}: An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "Unspecified error".
(SQL Server Import and Export Wizard)
Error 0xc020801c: Data Flow Task: The AcquireConnection method call to the connection manager "SourceConnectionOLEDB" failed with error code 0xC0202009.
(SQL Server Import and Export Wizard)
Error 0xc004701a: Data Flow Task: component "Source 64 - PlanClasses" (5206) failed the pre-execute phase and returned error code 0xC020801C.
(SQL Server Import and Export Wizard)
But if I divide importing as 2 steps:
1. import all tables before PlanClasses, it works.
2. import all tables after PlanClasses including PlanClasses, it works.

If I just import PlanClasses itself, it works, but I can not import all tables at once. Interesting thing is if I just unselect PlanClasses, it will have same error at the class right after PlanClasses. Is there size limitation when doing import at once?

Yes, unfortunately the wizard does not scale too well when you transfer many tables at once. It generates a single data flow task with as many sources and destinations as is the number of transferred tables. That makes such packages exhaust resources when the number of tables grows.

We have an optimization in place, which builds simple data flows on the fly for each table, but that only works for SQL Server to SQL Server transfers.

Thanks.

|||Will this problem be fixed at SP1? Thanks.
|||

No, unfortunately it is not likely for this to be addressed before the next major product version.

You are welcome though, to put your feedback on the MSDN Feedback site; the more requests for this we get the better chance is to be addressed earlier.

Thanks.

Wednesday, March 7, 2012

error 0x80004005 when copying tables between servers

hi
I've got a job which copy tables between different servers .
I am feeding the tables one by one and the process of copying is in a loop so I have cotrol over the copying process.
it works fine but sometimes randomly I am getting

Execution failed with the following error: "ERROR : errorCode=-1071636471 description=SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Invalid character value for cast specification".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Invalid character value for cast specification".
helpFile=dtsmsg.rll helpContext=0 idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}".

and the process fails and this might happen for in any point and on any table and sometimes it runs all the way successfully!!
any idea what the problem might be!
ThanksDo the tables have exactly the same structure? If not then I'd suggest it is as indicated a simple conversion error due to a type mismatch.|||Yes they are exactly the same is if it isn't it shouldn't run successfully sometimes!|||

Kolf wrote:

Yes they are exactly the same is if it isn't it shouldn't run successfully sometimes!

Unless they aren't the same, but normally the data can be explicitly cast to the destination type. Perhaps, though, that sometimes there is data in the source that cannot be cast.

How do you copy the tables?|||using the SSIS Object trasfer task object, and also I have to mention it is from sql 2000 to 2005
thanks|||

Kolf wrote:

using the SSIS Object trasfer task object, and also I have to mention it is from sql 2000 to 2005
thanks

Can you by chance post the create table statement for your table in SQL Server 2000?

Sunday, February 26, 2012

Error (1552) ODBC, Insert Execute Error

Hi, I have a program called dbms/copy that I use to conver clarion database tables. The program first creates the table, if already exists I delete and recreate. This part works fine. When it tries to insert the records I get the following error message:

Error (1552)

ODBC, Insert Execute Error -> Buffer Contained 100 Records but only 0 Records were written

I created a System DSN ODBC link to the SQL Server. I tried using the "sa" user, as well as creating a user and checking off all available permissions. It seems to be a permissions problem to me, although it appears I have permission to do everything. It is definately able to connect since it has no problem creating/deleting/recreating the table in the SQL Server database.

I tried doing the same import with an ODBC connection to a Microsoft Access database and it works without any problems.

Any idea what's giving me this error?I turned on ODBC tracing and the following errors showed up in the SQL.log file:

dbmswin7 f58-b90 ENTER SQLSetStmtAttr
SQLHSTMT 00E51F98
SQLINTEGER 6 <SQL_ATTR_CURSOR_TYPE>
SQLPOINTER 0x00000001
SQLINTEGER 0

dbmswin7 f58-b90 EXIT SQLSetStmtAttr with return code -1 (SQL_ERROR)
SQLHSTMT 00E51F98
SQLINTEGER 6 <SQL_ATTR_CURSOR_TYPE>
SQLPOINTER 0x00000001
SQLINTEGER 0

DIAG [24000] [Microsoft][ODBC Driver Manager] Invalid cursor state (0)

dbmswin7 f58-b90 ENTER SQLSetStmtAttr
SQLHSTMT 00E51F98
SQLINTEGER 7 <SQL_ATTR_CONCURRENCY>
SQLPOINTER 0x00000003
SQLINTEGER 0

dbmswin7 f58-b90 EXIT SQLSetStmtAttr with return code -1 (SQL_ERROR)
SQLHSTMT 00E51F98
SQLINTEGER 7 <SQL_ATTR_CONCURRENCY>
SQLPOINTER 0x00000003
SQLINTEGER 0

DIAG [24000] [Microsoft][ODBC Driver Manager] Invalid cursor state (0)

dbmswin7 f58-b90 ENTER SQLSetStmtAttr
SQLHSTMT 00E51F98
SQLINTEGER 5 <SQL_ATTR_ROW_BIND_TYPE>
SQLPOINTER 0x00000000
SQLINTEGER 0

dbmswin7 f58-b90 EXIT SQLSetStmtAttr with return code 0 (SQL_SUCCESS)
SQLHSTMT 00E51F98
SQLINTEGER 5 <SQL_ATTR_ROW_BIND_TYPE>
SQLPOINTER 0x00000000
SQLINTEGER 0

dbmswin7 f58-b90 ENTER SQLSetStmtAttr
SQLHSTMT 00E51F98
SQLINTEGER 27 <SQL_ATTR_ROW_ARRAY_SIZE>
SQLPOINTER 0x00000064
SQLINTEGER 0

dbmswin7 f58-b90 EXIT SQLSetStmtAttr with return code 0 (SQL_SUCCESS)
SQLHSTMT 00E51F98
SQLINTEGER 27 <SQL_ATTR_ROW_ARRAY_SIZE>
SQLPOINTER 0x00000064 (BADMEM)
SQLINTEGER 0

dbmswin7 f58-b90 ENTER SQLBulkOperations
SQLHSTMT 00E51F98
SQLSMALLINT 4

dbmswin7 f58-b90 EXIT SQLBulkOperations with return code -1 (SQL_ERROR)
SQLHSTMT 00E51F98
SQLSMALLINT 4

DIAG [S1092] [Microsoft][ODBC SQL Server Driver]Invalid attribute/option identifier (0)

dbmswin7 f58-b90 ENTER SQLRowCount
HSTMT 00E51F98
SQLLEN * 0x0012F7F4

dbmswin7 f58-b90 EXIT SQLRowCount with return code 0 (SQL_SUCCESS)
HSTMT 00E51F98
SQLLEN * 0x0012F7F4 (0)

dbmswin7 f58-b90 ENTER SQLDisconnect
HDBC 00E515E8

dbmswin7 f58-b90 EXIT SQLDisconnect with return code 0 (SQL_SUCCESS)
HDBC 00E515E8

Originally posted by UltraSmooth
Hi, I have a program called dbms/copy that I use to conver clarion database tables. The program first creates the table, if already exists I delete and recreate. This part works fine. When it tries to insert the records I get the following error message:

Error (1552)

ODBC, Insert Execute Error -> Buffer Contained 100 Records but only 0 Records were written

I created a System DSN ODBC link to the SQL Server. I tried using the "sa" user, as well as creating a user and checking off all available permissions. It seems to be a permissions problem to me, although it appears I have permission to do everything. It is definately able to connect since it has no problem creating/deleting/recreating the table in the SQL Server database.

I tried doing the same import with an ODBC connection to a Microsoft Access database and it works without any problems.

Any idea what's giving me this error?

Friday, February 24, 2012

Error - updating tables row using SqlDataSource

I have such a problem:

i try to update a row in my table using:

protected void selectButton_Click(object sender, EventArgs e)
{
String taskID = projectsGridView.SelectedRow.Cells[0].Text;
usersSqlDataSource.UpdateCommand = "update [Users] set [TaskID]=@.task where [UserID]=1";
usersSqlDataSource.UpdateParameters.Add("task", taskID);
usersSqlDataSource.Update();
}

And i receive error on usersSqlDataSource.Update():

You have specified that your update command compares all values on SqlDataSource 'usersSqlDataSource', but the dictionary passed in for oldValues is empty

What have i done wrong? Parameter are not set?

Check ConflictDetection attribute in your DataSource declaration.

Based on your usage it should be

ConflictDetection="OverwriteChanges"

Refer to the following link to better understand the implications of this setting

http://msdn2.microsoft.com/en-US/library/system.web.ui.webcontrols.sqldatasource.conflictdetection.aspx

|||

One way to solve this is to change the ConflictDetection property of your datasource to OverWriteChanges. At the moment it is set at CompareAllValues. If you want to keep the CompareAllValues setting, you need to add the old Values for each parameter to the UpdateParameters collection too.http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.sqldatasource.oldvaluesparameterformatstring(vs.80).aspx

|||

Yes, it works fine now, thanks!

Error - trying to get only latest

Hi

I'm trying to get some data fra a few tables, but I'm having a few
problems.

What I would like is this:

The tables contain somn info on manuscripts and which process that
manuascript has received.

a manuscript is represented once in manuascript table
that manuascript can have several records in the process table.

What I want is to get data for each manuscript and the last process that
the manuscript received from the process table.

This SQL gets the manuscript for each process it has received. SO if a
manuscript has 5 process records I will get 5 records back...

SELECT
Manuscript.m_id, Manuscript.uniqueIDCountry,
Manuscript.uniqueIDNo, Manuscript.m_title,
Manuscript.country, Manuscript.m_receivedDate,
Process.p_id, Process.m_id, Process.processDate,
ProcessTypes.ps_id, ProcessTypes.processName
FROM
Manuscript,
Process,
ProcessTypes
WHERE [Process].m_id = [Manuscript].m_id
AND [Process].ps_id = [ProcessTypes].ps_id

Please help... I'm getting desperate..

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Try (untested)

SELECT
M.m_id,
M.uniqueIDCountry,
M.uniqueIDNo,
M.m_title,
M.country,
M.m_receivedDate,
P.p_id,
P.m_id,
MAX(P.processDate) AS ProcessDate,
PT.ps_id,
PT.processName

FROM
Manuscript M
LEFT JOIN Process P
ON M.M_Id = P.M_Id
LEFT JOIN ProcessTypes PT
ON P.PS_Id = PT.PS_Id

GROUP BY
M.m_id,
M.uniqueIDCountry,
M.uniqueIDNo,
M.m_title,
M.country,
M.m_receivedDate,
P.p_id,
P.m_id,
PT.ps_id,
PT.processName

I've taken a guess that the max of the ProcessDate from your process
table will give you the last record that you want. You may need to
look at which columns are appropriate for giving you the correct
record, your column names aren't the most helpful hence the guess. The
left join is what you were missing though.

I've not added in anything for your third table and assumed that it is
a stright one to one relationship, but you should easily see how to do
anything further. I've also added some table aliases and tidied things
up a bit to make it easier to read.

Hope that helps

Ryan

Thomas Stark <stark@.newidentity.dk> wrote in message news:<41777eca$0$24956$c397aba@.news.newsgroups.ws>...
> Hi
> I'm trying to get some data fra a few tables, but I'm having a few
> problems.
> What I would like is this:
> The tables contain somn info on manuscripts and which process that
> manuascript has received.
> a manuscript is represented once in manuascript table
> that manuascript can have several records in the process table.
> What I want is to get data for each manuscript and the last process that
> the manuscript received from the process table.
>
> This SQL gets the manuscript for each process it has received. SO if a
> manuscript has 5 process records I will get 5 records back...
> SELECT
> Manuscript.m_id, Manuscript.uniqueIDCountry,
> Manuscript.uniqueIDNo, Manuscript.m_title,
> Manuscript.country, Manuscript.m_receivedDate,
> Process.p_id, Process.m_id, Process.processDate,
> ProcessTypes.ps_id, ProcessTypes.processName
> FROM
> Manuscript,
> Process,
> ProcessTypes
> WHERE [Process].m_id = [Manuscript].m_id
> AND [Process].ps_id = [ProcessTypes].ps_id
>
> Please help... I'm getting desperate..
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!|||Thanks a lot.

Yeah thats pretty much what I was looking for.

I've spent hours trying to sort it out.. Maybe I should try and learn a
bit more SQL..

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Wednesday, February 15, 2012

Erroon trying take make a relation between 2 tables

I want a PK-FK relation between my tables:

Products (PK = ProductID)
Orders = (FK = ProductID)

How can I do this in SQL 2005?

Just add this to your query window to create table ,this is just a sample syntax.U can change it according to your need.

ALTER TABLE [dbo].[Products] WITH CHECK ADD CONSTRAINT [PK_ProductID] PRIMARY KEY([ProductID])

(the above synatax would make ProductID as primary key in your Products Table)

ALTER TABLE [dbo].[Orders] WITH CHECK ADD CONSTRAINT [FK_ProductID] FOREIGN KEY([ProductID])
REFERENCES [dbo].[Products] ([ProductID])

(this syntax woud create PK-FK relation between your Product and Orders Tables)