Showing posts with label express. Show all posts
Showing posts with label express. Show all posts

Friday, March 30, 2012

multi step OLE DB error

Hi All,

I have a MS Access DB that I have successfully u/graded to SQL Express 2005. I run my code using a recordset as normal, and all connections to the database work fine, but I receive the multi step OLE DB error when it gets to a line trying to populate an address field which has a datatype of nvarchar(max), null. (Field was Memo in Access version before).

This field in SQL2005 has allow nulls.

I've tried to add an empty string " " to the variable before being saved, but this still doesn't work.

Any ideas?


Hi,

could you please provide the code you are using as well as the exact error message ?

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Hi,

The exact error message received is:

-2147217887 - Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

**************************************************************************

The code that is used, (some cut to save space) is below. All is fine, but breaks on the Physical Address line highlighted.

GetDSN gets the DSN in the DSN settings using ODBC. As I said, this worked in Access, but now in SQL, its not working.

**************************************************************************

Public Function mStaffUpdate(StaffID As Long, Title As String, FirstName As String, LastName As String, _
JobTitle As String, Department As String, Phone As String, _
Fax As String, PhoneExt As String, Mobile As String, _
HomePhone As String, Email As String, Website As String, _
CompanyLink As Long, PhysicalAddress As String, _
PhysicalCity As String, PhysicalState As String, PhysicalZipCode As String, _
PhysicalCountry As String, PostalAddress As String, _
PostalCity As String, PostalState As String, _
PostalZipCode As String, PostalCountry As String, _
UserName As String, Password As String, SecurityLevel As String)

' Open a Connection Object to the database
Dim cnnData As ADODB.Connection
Set cnnData = New Connection

cnnData.Open GetDSN

' Open a Recordset Object
Dim rsData As ADODB.Recordset
Set rsData = New ADODB.Recordset
Dim strSQL As String
strSQL = "SELECT * FROM tblStaff WHERE StaffID= " & StaffID
rsData.Open strSQL, cnnData, adOpenStatic, adLockPessimistic

'cut some out for less to see here...
rsData.Fields("HomePhone").Value = HomePhone
rsData.Fields("Email").Value = Email
rsData.Fields("Website").Value = Website
rsData.Fields("PhysicalAddress").Value = PhysicalAddress & " "
rsData.Fields("PhysicalCity").Value = PhysicalCity & " "
rsData.Fields("PhysicalState").Value = PhysicalState & " "

rsData.Update

' Close cnn and recordset
rsData.Close
Set rsData = Nothing
cnnData.Close
Set cnnData = Nothing

End Function

|||any ideas?|||Do you exceed the max possible characters eventually ?

HTH, Jens K. Suessmeyer.

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

No. Actually the address field doesn't need to be that large, it will only have 3-4 lines of an address. But I can't work out why this error is happenning?

|||any suggestions|||

Hi All,

Is there a different group that might be better to help with this question above?

I'm really keen to know what's the cause of this error and how to correct.

|||Moved to Data Access :-)|||can anyone help?|||any ideas?|||

What OLEDB provider are you using?

- Waseem

|||

i have this same problem,

program written in visual basic run properly on access database, but on sql server 2k sp 4 causes errors with

multi step error.

i change provider from mdac to sql native client and now program is running great

and this is only one opportunity to get your program running (i think - updating mdac doesn't help me)

best

|||

mrowek wrote:

i change provider from mdac to sql native client and now program is running great

and this is only one opportunity to get your program running (i think - updating mdac doesn't help me)

yeah, i just check code in vb with SQLOLEDB.1 provider

when it's saves strings to db it generate error

i put trim(cstr(blah blah)) and now it's write correctly to db without multi step error

[; check code and put this same

it should help

|||

My program occurs this error at the line below:

rs.delete <- occurs "multi-step multi step OLE DB error ......."

I spent two days for finding the resolve way....

then.....I insert "rs.AbsolutePosition = rs.AbsolutePosition" before "rs.delete", like:

.....

rs.AbsolutePosition = rs.AbsolutePosition

rs.delete

rs.update

......

and the error is gone............(maybe this is the most strange thing I have ever seen....@.@.)

multi step OLE DB error

Hi All,

I have a MS Access DB that I have successfully u/graded to SQL Express 2005. I run my code using a recordset as normal, and all connections to the database work fine, but I receive the multi step OLE DB error when it gets to a line trying to populate an address field which has a datatype of nvarchar(max), null. (Field was Memo in Access version before).

This field in SQL2005 has allow nulls.

I've tried to add an empty string " " to the variable before being saved, but this still doesn't work.

Any ideas?


Hi,

could you please provide the code you are using as well as the exact error message ?

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Hi,

The exact error message received is:

-2147217887 - Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

**************************************************************************

The code that is used, (some cut to save space) is below. All is fine, but breaks on the Physical Address line highlighted.

GetDSN gets the DSN in the DSN settings using ODBC. As I said, this worked in Access, but now in SQL, its not working.

**************************************************************************

Public Function mStaffUpdate(StaffID As Long, Title As String, FirstName As String, LastName As String, _
JobTitle As String, Department As String, Phone As String, _
Fax As String, PhoneExt As String, Mobile As String, _
HomePhone As String, Email As String, Website As String, _
CompanyLink As Long, PhysicalAddress As String, _
PhysicalCity As String, PhysicalState As String, PhysicalZipCode As String, _
PhysicalCountry As String, PostalAddress As String, _
PostalCity As String, PostalState As String, _
PostalZipCode As String, PostalCountry As String, _
UserName As String, Password As String, SecurityLevel As String)

' Open a Connection Object to the database
Dim cnnData As ADODB.Connection
Set cnnData = New Connection

cnnData.Open GetDSN

' Open a Recordset Object
Dim rsData As ADODB.Recordset
Set rsData = New ADODB.Recordset
Dim strSQL As String
strSQL = "SELECT * FROM tblStaff WHERE StaffID= " & StaffID
rsData.Open strSQL, cnnData, adOpenStatic, adLockPessimistic

'cut some out for less to see here...
rsData.Fields("HomePhone").Value = HomePhone
rsData.Fields("Email").Value = Email
rsData.Fields("Website").Value = Website
rsData.Fields("PhysicalAddress").Value = PhysicalAddress & " "
rsData.Fields("PhysicalCity").Value = PhysicalCity & " "
rsData.Fields("PhysicalState").Value = PhysicalState & " "

rsData.Update

' Close cnn and recordset
rsData.Close
Set rsData = Nothing
cnnData.Close
Set cnnData = Nothing

End Function

|||any ideas?|||Do you exceed the max possible characters eventually ?

HTH, Jens K. Suessmeyer.

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

No. Actually the address field doesn't need to be that large, it will only have 3-4 lines of an address. But I can't work out why this error is happenning?

|||any suggestions|||

Hi All,

Is there a different group that might be better to help with this question above?

I'm really keen to know what's the cause of this error and how to correct.

|||Moved to Data Access :-)|||can anyone help?|||any ideas?|||

What OLEDB provider are you using?

- Waseem

|||

i have this same problem,

program written in visual basic run properly on access database, but on sql server 2k sp 4 causes errors with

multi step error.

i change provider from mdac to sql native client and now program is running great

and this is only one opportunity to get your program running (i think - updating mdac doesn't help me)

best

|||

mrowek wrote:

i change provider from mdac to sql native client and now program is running great

and this is only one opportunity to get your program running (i think - updating mdac doesn't help me)

yeah, i just check code in vb with SQLOLEDB.1 provider

when it's saves strings to db it generate error

i put trim(cstr(blah blah)) and now it's write correctly to db without multi step error

[; check code and put this same

it should help

|||

My program occurs this error at the line below:

rs.delete <- occurs "multi-step multi step OLE DB error ......."

I spent two days for finding the resolve way....

then.....I insert "rs.AbsolutePosition = rs.AbsolutePosition" before "rs.delete", like:

.....

rs.AbsolutePosition = rs.AbsolutePosition

rs.delete

rs.update

......

and the error is gone............(maybe this is the most strange thing I have ever seen....@.@.)

Multi site using SQL Express 2005

Hi,
I am writing Stock inventory and POS application.
POS will be used at multiple branches to collect sales, whereby Stock Inventory will be used in HQ for product info maintenance, stock in and etc.

I need to send all of the branch sales records back to HQ and send updated product info such as cost to branches everyday (could be multiple times per day).

I am thinking to use SQL Server Express 2005 at branches and SQL Server 2005 standard at HQ.

Do you think it is workable? What is the mechanism I can use to "transfer" these data?

Please advice.

Thank youHi,

compared to the MSDE, SQL Server 2005 Express only supports subscriptions for data. SSE can no longer by used as a publisher for changed data. SO you will have to either use another edition of SQL Server for transfering the updated data / use MSDE / create your own logic to tranfer the data from the branches to the HQ. Product info can be replicated to the branches using replication, as they can (as already mentioned above) act as subscribers.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Monday, March 26, 2012

Multi Column Keys

Is it possible to create multi column keys in SQL Express? If so, how?

Thanks

MisterT

I found the answer.

Just hold down the Shift key while clicking on the columns. Then click on the "Set primary key".

Have a good day !

Thanks

Wednesday, March 21, 2012

MSXML6 breaks viewer used with Microsoft Electronic Learning Library

Installation of SQL 2005 Express resulted in the failure of the viewer used with the Microsoft Electronic Learning Library products. The viewer runs under IE and is driven by an XML file.

This has been verified on several systems. I uninstalled only MSXML6 and the viewer worked normally.

I have no idea if the problem is with the viewer script, the XML file driving it, or MSXML6 but obviously this might be a breaking change to the product.

Can anyone shed light?

Tom Skinner [C# MVP]

Hi Tom,

I'm looking into this for you.

Mike Wachal
SQL Express

|||

I found a workaround. If you disable the XML DOM Document 6.0 add-on in IE the viewer loads OK. Apparently MSXML6 is used by IE as the default if it is installed. This broke the MELL viewer. It would still be valuable to know why as other programs using IE as a frontend may break as well.

Tom Skinner [C# MVP]

|||

Hi,

The MELL dev team has been made aware of the issue that XML Parser 6.0 breaks MELL. They are currently working on putting together a patch for this. As soon as the patch becomes available, we will let you know.

Thanks.

|||

Before you run Mell, open up a dos window and run:

regsvr32 -u %windir%\system32\msxml6.dll

You should get an acknowledgement that the unregister was successful.

Start up your Mell training.

Go back to the DOS window and run:

regsvr32 %windir%\system32\msxml6.dll

Again, you should get an acknowledgement. Learn away. Doing it this way means you won't forget to put things back so that SQL Server 2005 is fully functional.

David Rogers (MCP, LIMOM)

|||Thanks. This fix my e-learning viewer problem. Is SQL 2005 express the only program dependent on msxml6.dll?|||according to MS this "bug" was done by design, the new xml parser blocks certain calls from mell because they are less secure, and ms is suppossed to have released a fix for this, but they have not done so yet...and the ppl from the xml team say the work around posted here (which has been suggested in many other places) is not recommended since it defaults your system to use the older less secure xml parser|||The fix is now located at http://support.microsoft.com/kb/917583/en-us

MSXML6 breaks viewer used with Microsoft Electronic Learning Library

Installation of SQL 2005 Express resulted in the failure of the viewer used with the Microsoft Electronic Learning Library products. The viewer runs under IE and is driven by an XML file.

This has been verified on several systems. I uninstalled only MSXML6 and the viewer worked normally.

I have no idea if the problem is with the viewer script, the XML file driving it, or MSXML6 but obviously this might be a breaking change to the product.

Can anyone shed light?

Tom Skinner [C# MVP]

Hi Tom,

I'm looking into this for you.

Mike Wachal
SQL Express

|||

I found a workaround. If you disable the XML DOM Document 6.0 add-on in IE the viewer loads OK. Apparently MSXML6 is used by IE as the default if it is installed. This broke the MELL viewer. It would still be valuable to know why as other programs using IE as a frontend may break as well.

Tom Skinner [C# MVP]

|||

Hi,

The MELL dev team has been made aware of the issue that XML Parser 6.0 breaks MELL. They are currently working on putting together a patch for this. As soon as the patch becomes available, we will let you know.

Thanks.

|||

Before you run Mell, open up a dos window and run:

regsvr32 -u %windir%\system32\msxml6.dll

You should get an acknowledgement that the unregister was successful.

Start up your Mell training.

Go back to the DOS window and run:

regsvr32 %windir%\system32\msxml6.dll

Again, you should get an acknowledgement. Learn away. Doing it this way means you won't forget to put things back so that SQL Server 2005 is fully functional.

David Rogers (MCP, LIMOM)

|||Thanks. This fix my e-learning viewer problem. Is SQL 2005 express the only program dependent on msxml6.dll?|||according to MS this "bug" was done by design, the new xml parser blocks certain calls from mell because they are less secure, and ms is suppossed to have released a fix for this, but they have not done so yet...and the ppl from the xml team say the work around posted here (which has been suggested in many other places) is not recommended since it defaults your system to use the older less secure xml parser|||The fix is now located at http://support.microsoft.com/kb/917583/en-ussql

MSXML6 breaks viewer used with Microsoft Electronic Learning Library

Installation of SQL 2005 Express resulted in the failure of the viewer used with the Microsoft Electronic Learning Library products. The viewer runs under IE and is driven by an XML file.

This has been verified on several systems. I uninstalled only MSXML6 and the viewer worked normally.

I have no idea if the problem is with the viewer script, the XML file driving it, or MSXML6 but obviously this might be a breaking change to the product.

Can anyone shed light?

Tom Skinner [C# MVP]

Hi Tom,

I'm looking into this for you.

Mike Wachal
SQL Express

|||

I found a workaround. If you disable the XML DOM Document 6.0 add-on in IE the viewer loads OK. Apparently MSXML6 is used by IE as the default if it is installed. This broke the MELL viewer. It would still be valuable to know why as other programs using IE as a frontend may break as well.

Tom Skinner [C# MVP]

|||

Hi,

The MELL dev team has been made aware of the issue that XML Parser 6.0 breaks MELL. They are currently working on putting together a patch for this. As soon as the patch becomes available, we will let you know.

Thanks.

|||

Before you run Mell, open up a dos window and run:

regsvr32 -u %windir%\system32\msxml6.dll

You should get an acknowledgement that the unregister was successful.

Start up your Mell training.

Go back to the DOS window and run:

regsvr32 %windir%\system32\msxml6.dll

Again, you should get an acknowledgement. Learn away. Doing it this way means you won't forget to put things back so that SQL Server 2005 is fully functional.

David Rogers (MCP, LIMOM)

|||Thanks. This fix my e-learning viewer problem. Is SQL 2005 express the only program dependent on msxml6.dll?|||according to MS this "bug" was done by design, the new xml parser blocks certain calls from mell because they are less secure, and ms is suppossed to have released a fix for this, but they have not done so yet...and the ppl from the xml team say the work around posted here (which has been suggested in many other places) is not recommended since it defaults your system to use the older less secure xml parser|||The fix is now located at http://support.microsoft.com/kb/917583/en-us

Monday, March 12, 2012

MSSQLServer Express and Delphi application

Dear friends I have a problem with the use of DELPHI and MSSQLServer!

I have installed in a PC a MSSQLServer Express. The PC is connected

with a other via a small network. I have developed an application in DELPHI

which runs also in the two computers. I have regulated SQLServer so as

to is accessible via TCP/IP, make that I tryed after in the other PC I

installed SQL Server Management Studio Express and had access in the

database via the network. While in the beginning both applications

worked normaly and were connected regularly in the base suddenly

one day they couldn't be connected giving as message the following

"DataBase Server Error: SQL State: 08001, SQL Error Code: 17 ", as there was no server. That is to say without I have teased the

properties the access to DataBase was impossible via the application but possible via the SQL

Server Management Studio Express and the environment of Borland Delphi

2005 from both PC's. That is to say

suddenly only the application simply could not be connected. I tryed

a lot of solutions but no one it did not work. When I installed the

MSSQLServer Express in the other PC the application could be connected

from this but no from the other via network always giving the same

message. Has anyone any idea why I am in impasse from solutions!!!!

Thak you in advance!

It is hard to diagnose based on what you describe here. But it could be related to the connection protocols. The following article may help you :

http://blogs.msdn.com/sql_protocols/archive/2005/12/19/505372.aspx

|||Thank you my friend, I will use your advises as soon as possible and I wish they will help me!

Friday, March 9, 2012

MSSQL2005 Express SP2 on Vista Professional does not support Extended SP?

Can you explain please why Extended SP does not work under Vista ?

Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Express Edition on Windows NT 6.0 (Build 6000: )

UAC turned off. MSQSL runs under Administrator account.

Any call of user esp - and SQL server goes to loop.
If I call system esp - all works fine.

If I try to read properties of ESP from Management Studio - I have the same effect - SQL server is in loop.

select object_id('dbo.xp_mylog')

-- works.


EXEC('sp_helpextendedproc ''xp_mylog''')

xp_mylog c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\LogEsp.dll

exec master..xp_mylog

die forever

Konstantin

Hi Konstantin,

Have you enabled extended sprocs? They are disabled by default.

Mike

|||

No I did not. How to do this ? I know how to do in Stanard Edition. But this option not visible in Express edition.

There is a TSQL statement to change it or change it in the registry ?

|||

is any body can halp me ?

|||

Is there is anybody from Microsoft who knows how to enable ESP ?

|||

I guess, this is what Mike means:

Open SAC > ...for features ... Navigate your instance ... OLE Automation > enable

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

Extended Stored Procedure is not ActiveX

MSSQL2005 Express SP2 on Vista Professional does not support Extended SP?

Can you explain please why Extended SP does not work under Vista ?

Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Express Edition on Windows NT 6.0 (Build 6000: )

UAC turned off. MSQSL runs under Administrator account.

Any call of user esp - and SQL server goes to loop.
If I call system esp - all works fine.

If I try to read properties of ESP from Management Studio - I have the same effect - SQL server is in loop.

select object_id('dbo.xp_mylog')

-- works.


EXEC('sp_helpextendedproc ''xp_mylog''')

xp_mylog c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\LogEsp.dll

exec master..xp_mylog

die forever

Konstantin

Hi Konstantin,

Have you enabled extended sprocs? They are disabled by default.

Mike

|||

No I did not. How to do this ? I know how to do in Stanard Edition. But this option not visible in Express edition.

There is a TSQL statement to change it or change it in the registry ?

|||

is any body can halp me ?

|||

Is there is anybody from Microsoft who knows how to enable ESP ?

|||

I guess, this is what Mike means:

Open SAC > ...for features ... Navigate your instance ... OLE Automation > enable

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

Extended Stored Procedure is not ActiveX

MSSQL2005 Express SP2 on Vista Professional does not support Extended SP?

Can you explain please why Extended SP does not work under Vista ?

Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Express Edition on Windows NT 6.0 (Build 6000: )

UAC turned off. MSQSL runs under Administrator account.

Any call of user esp - and SQL server goes to loop.
If I call system esp - all works fine.

If I try to read properties of ESP from Management Studio - I have the same effect - SQL server is in loop.

select object_id('dbo.xp_mylog')

-- works.


EXEC('sp_helpextendedproc ''xp_mylog''')

xp_mylog c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\LogEsp.dll

exec master..xp_mylog

die forever

Konstantin

Hi Konstantin,

Have you enabled extended sprocs? They are disabled by default.

Mike

|||

No I did not. How to do this ? I know how to do in Stanard Edition. But this option not visible in Express edition.

There is a TSQL statement to change it or change it in the registry ?

|||

is any body can halp me ?

|||

Is there is anybody from Microsoft who knows how to enable ESP ?

|||

I guess, this is what Mike means:

Open SAC > ...for features ... Navigate your instance ... OLE Automation > enable

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

Extended Stored Procedure is not ActiveX

MSSQL2005 Express SP2 on Vista Professional does not support Extended SP?

Can you explain please why Extended SP does not work under Vista ?

Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Express Edition on Windows NT 6.0 (Build 6000: )

UAC turned off. MSQSL runs under Administrator account.

Any call of user esp - and SQL server goes to loop.
If I call system esp - all works fine.

If I try to read properties of ESP from Management Studio - I have the same effect - SQL server is in loop.

select object_id('dbo.xp_mylog')

-- works.


EXEC('sp_helpextendedproc ''xp_mylog''')

xp_mylog c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\LogEsp.dll

exec master..xp_mylog

die forever

Konstantin

Hi Konstantin,

Have you enabled extended sprocs? They are disabled by default.

Mike

|||

No I did not. How to do this ? I know how to do in Stanard Edition. But this option not visible in Express edition.

There is a TSQL statement to change it or change it in the registry ?

|||

is any body can halp me ?

|||

Is there is anybody from Microsoft who knows how to enable ESP ?

|||

I guess, this is what Mike means:

Open SAC > ...for features ... Navigate your instance ... OLE Automation > enable

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

Extended Stored Procedure is not ActiveX