Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Friday, March 30, 2012

One more Beginner Problem

I need to restore multiple tables in a sequence. I am writing separate data flow for each table restore.

If there is any error in any of the table restore data flow, I want to write that error in a log file.

I am writing a script component in every data flow, which will get error code & error description, that i am writing in the log fie.

Is there a way to create a public reusable error logging script file, which we can call from every data flow and log only errors which we want?

Also want to confirm if the way i am doing is correct way or is there any easier/better way to achieve this?

It goes something like this:

Try
'create sqlcommand specifying connection and query
'create reader

reader = sqlcommand.ExecuteReader() <== this throws an "Object reference not set to an instance of an object" exception

'... other stuff here...
Catch ex as Exception
Row.DirectToErrorOutput()
Finally
'dispose sqlcommand and reader here...
End Try


Despite the Catch block, the Script Component still fails, and doesn't get redirected to the ErrorOutput path.

Any ideas on how to solve this?sql

One for the MVP's

Has anyone seen this kind of error.
I have a datawarehouse that I have to load and optomize
each morning before everyone gets in. The last few days
the load has failed due to not being able to update the
statistics on the tables. THey error out and here is what
I ma getting in the log. I have researched and our
networking group had a tech come in and upgrade the
controllers on the cluster where the db resides this
weekend. I believe what I am getting is a controller that
has trouble writing or disks that are not able to talk
well with the controller. DBCC checkDB shows that the
system has errors. Last night I ran a repair_fast on the
database in question but now it is accross all databases.
what do you think and have you had this before? thanks in
advance.
SQL Server Assertion: File: <recbase.cpp>, line=1374
Failed Assertion = 'm_nVars > 0'.If I were you, Id be calling PSS. It could be a bug, a corrupt database..
Whatever being the case, your best bet is getting PSS involved at this time.
Hope you have some good backups..
"Scott Dexter" <anonymous@.discussions.microsoft.com> wrote in message
news:01f901c3c59e$e8204740$a401280a@.phx.gbl...
> Has anyone seen this kind of error.
> I have a datawarehouse that I have to load and optomize
> each morning before everyone gets in. The last few days
> the load has failed due to not being able to update the
> statistics on the tables. THey error out and here is what
> I ma getting in the log. I have researched and our
> networking group had a tech come in and upgrade the
> controllers on the cluster where the db resides this
> weekend. I believe what I am getting is a controller that
> has trouble writing or disks that are not able to talk
> well with the controller. DBCC checkDB shows that the
> system has errors. Last night I ran a repair_fast on the
> database in question but now it is accross all databases.
> what do you think and have you had this before? thanks in
> advance.
>
> SQL Server Assertion: File: <recbase.cpp>, line=1374
> Failed Assertion = 'm_nVars > 0'.|||Doessound like hardware corruption. As Hassan states you can contact MS PSS
if you want to be sure andthey can walk thru the issues with you.
--
Andrew J. Kelly SQL MVP
"Scott Dexter" <anonymous@.discussions.microsoft.com> wrote in message
news:01f901c3c59e$e8204740$a401280a@.phx.gbl...
> Has anyone seen this kind of error.
> I have a datawarehouse that I have to load and optomize
> each morning before everyone gets in. The last few days
> the load has failed due to not being able to update the
> statistics on the tables. THey error out and here is what
> I ma getting in the log. I have researched and our
> networking group had a tech come in and upgrade the
> controllers on the cluster where the db resides this
> weekend. I believe what I am getting is a controller that
> has trouble writing or disks that are not able to talk
> well with the controller. DBCC checkDB shows that the
> system has errors. Last night I ran a repair_fast on the
> database in question but now it is accross all databases.
> what do you think and have you had this before? thanks in
> advance.
>
> SQL Server Assertion: File: <recbase.cpp>, line=1374
> Failed Assertion = 'm_nVars > 0'.sql

Monday, March 26, 2012

One client machine gets a connection error

Which talks about Named Pipes.
We're not using Named Pipes, we're using TCP/IP.
All of the four other machines work...why not this one.
Note. It's a machine that has been reformatted and programs reinstalled.
But my program does nothing special other than connect to a SQL Server
through a WAN.
I'm obviously missing something.
Kyle!Compare the client netlib configuration between the machines (cliconfg.exe).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Kyle Jedrusiak" <kjedrusiak@.princetoninformation.com> wrote in message
news:ujMzvwWnHHA.5052@.TK2MSFTNGP04.phx.gbl...
> Which talks about Named Pipes.
> We're not using Named Pipes, we're using TCP/IP.
> All of the four other machines work...why not this one.
> Note. It's a machine that has been reformatted and programs reinstalled.
> But my program does nothing special other than connect to a SQL Server through a WAN.
> I'm obviously missing something.
>
> Kyle!
>|||Since reformatted and reinstalled, how about windows internet firewall is on
(enabled by default when you applied windows xp SP2)? Or another firewall
product perhaps? Can you connect if you explicitly put in the ip address of
the machine in QA/SSMS?
--
TheSQLGuru
President
Indicium Resources, Inc.
"Kyle Jedrusiak" <kjedrusiak@.princetoninformation.com> wrote in message
news:ujMzvwWnHHA.5052@.TK2MSFTNGP04.phx.gbl...
> Which talks about Named Pipes.
> We're not using Named Pipes, we're using TCP/IP.
> All of the four other machines work...why not this one.
> Note. It's a machine that has been reformatted and programs reinstalled.
> But my program does nothing special other than connect to a SQL Server
> through a WAN.
> I'm obviously missing something.
>
> Kyle!
>sql

One client machine gets a connection error

Which talks about Named Pipes.
We're not using Named Pipes, we're using TCP/IP.
All of the four other machines work...why not this one.
Note. It's a machine that has been reformatted and programs reinstalled.
But my program does nothing special other than connect to a SQL Server
through a WAN.
I'm obviously missing something.
Kyle!
Compare the client netlib configuration between the machines (cliconfg.exe).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Kyle Jedrusiak" <kjedrusiak@.princetoninformation.com> wrote in message
news:ujMzvwWnHHA.5052@.TK2MSFTNGP04.phx.gbl...
> Which talks about Named Pipes.
> We're not using Named Pipes, we're using TCP/IP.
> All of the four other machines work...why not this one.
> Note. It's a machine that has been reformatted and programs reinstalled.
> But my program does nothing special other than connect to a SQL Server through a WAN.
> I'm obviously missing something.
>
> Kyle!
>
|||Since reformatted and reinstalled, how about windows internet firewall is on
(enabled by default when you applied windows xp SP2)? Or another firewall
product perhaps? Can you connect if you explicitly put in the ip address of
the machine in QA/SSMS?
TheSQLGuru
President
Indicium Resources, Inc.
"Kyle Jedrusiak" <kjedrusiak@.princetoninformation.com> wrote in message
news:ujMzvwWnHHA.5052@.TK2MSFTNGP04.phx.gbl...
> Which talks about Named Pipes.
> We're not using Named Pipes, we're using TCP/IP.
> All of the four other machines work...why not this one.
> Note. It's a machine that has been reformatted and programs reinstalled.
> But my program does nothing special other than connect to a SQL Server
> through a WAN.
> I'm obviously missing something.
>
> Kyle!
>

One client machine gets a connection error

Which talks about Named Pipes.
We're not using Named Pipes, we're using TCP/IP.
All of the four other machines work...why not this one.
Note. It's a machine that has been reformatted and programs reinstalled.
But my program does nothing special other than connect to a SQL Server
through a WAN.
I'm obviously missing something.
Kyle!Compare the client netlib configuration between the machines (cliconfg.exe).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Kyle Jedrusiak" <kjedrusiak@.princetoninformation.com> wrote in message
news:ujMzvwWnHHA.5052@.TK2MSFTNGP04.phx.gbl...
> Which talks about Named Pipes.
> We're not using Named Pipes, we're using TCP/IP.
> All of the four other machines work...why not this one.
> Note. It's a machine that has been reformatted and programs reinstalled.
> But my program does nothing special other than connect to a SQL Server thr
ough a WAN.
> I'm obviously missing something.
>
> Kyle!
>|||Since reformatted and reinstalled, how about windows internet firewall is on
(enabled by default when you applied Windows XP SP2)? Or another firewall
product perhaps? Can you connect if you explicitly put in the ip address of
the machine in QA/SSMS?
TheSQLGuru
President
Indicium Resources, Inc.
"Kyle Jedrusiak" <kjedrusiak@.princetoninformation.com> wrote in message
news:ujMzvwWnHHA.5052@.TK2MSFTNGP04.phx.gbl...
> Which talks about Named Pipes.
> We're not using Named Pipes, we're using TCP/IP.
> All of the four other machines work...why not this one.
> Note. It's a machine that has been reformatted and programs reinstalled.
> But my program does nothing special other than connect to a SQL Server
> through a WAN.
> I'm obviously missing something.
>
> Kyle!
>

Once again, no records returned....

The following sproc returns no records in query analyzer, although it doesn't error out either. Last time adding the length to the end of the variable fixed this problem, but this time it's an integer type which doesn't accept a length. Any ideas?

------------------------------
CREATE PROCEDURE spUnitsbyUnitID
@.unitid int
AS

SELECT
E.camid, E.camname, E.cammodel, E.unitid,
D.contactid, D.Contactfname, D.Contactlname, D.Contactphone, D.Contactcell, D.Contactcompany, D.unitid,
C.videoserverid, C.videoservermac, C.videoserveruser, C.videoserverpass, C.videoservermodel, C.videoserverip, C.unitid,
B.radioid, B.radioip, B.radiomac, B.radioessid, B.radiouser, B.radiopass, B.unitid,
A.unitid, A.unitcity, A.unitname, A.unitalias, A.unitdeploydate, A.unitpickupdate, A.unitattatchedcams, A.unitenabled

FROM tbl_units as A

INNER JOIN tbl_radios as B ON A.unitid = B.unitid
INNER JOIN tbl_videoservers as C ON A.unitid = C.unitid
INNER JOIN tbl_contacts as D on A.unitid = D.unitid
INNER JOIN tbl_cameras as E on A.unitid = E.unitid

WHERE A.UnitID = @.unitID
GO
-------------------------------Are you sure that there are records in all 5 tables with the same unitid ? Using inner joins, you are limiting the result set to that scenario.

Jeff|||You are missing the OUTPUT keyword which is required for stored Procs returning none Numeric value. As per the previous post you can only use INNER JOIN if both tables are equal and the ANSI SQL OUTER JOIN limit is four because OUTER JOIN has default NULL condition but that may not work for HTTP applications because HTTP aplications are Stateless. Check out the MSDN link below.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_07_3q7n.asp Hope this helps.

Kind regards,
Gift Peddie|||Found the problem, 1 of the tables didn't have a test value entered in for the unitID. Thanks for the help!sql

On error i want to send error description as mail

I have create a SSIS package, for data export import process, but if my task get failed then i have to send a mail with proper error description as the SSIS generate in output window.

Can any one sugget me to, how can i store that error desciption in my variable.?

Thanks in advance.

You can create a table with the following fields packageid,packagename,taskname,errormessage.

And later write a stored procedure which will insert the data into this table from the package variables. On event handler tab call this stored procedure and pass the system variables "system::executioninstanceguid","system::packagename","system::sourcename","system::errordescription".

Once this is done you can read values from this particular table and assign it to a variable and later on call it in the send mail task.Hope this will help you.

|||

Use OnError Event in Event Handler and system variables such as [System::ErrorCode] and [System::ErrorDescription]

http://msdn2.microsoft.com/en-us/library/ms139744.aspx

|||

As you define above i'm doing such a way

dts.variable("User::vName").value = dts.variable("System::ErrorDescription")

but it is going me error in my script task.

:-(

please provide more specific detail or information.

|||

Hi..

1. In OnError Event Handler, Add a Script Task..

2. Define ReadWriteVariables value in ScriptTask Properties like this

ReadWriteVariables | User::vName,System::ErrorDescription

3. In VSA, edit your script like this..

Dts.Variables("vName").Value = Dts.Variables("ErrorDescription").Value.ToString

HTH

ADConsulting / SQLLeader.com / Daeseong Han

|||

Thanks for you needful help.

:-)

sql

Friday, March 23, 2012

On DELETE On UPDATE Cascade syntax error

Hello

I need to be able to regularly, update or delete data from my parent table and subsequent child tables from A to Z, each table contains data. However, I have having problems.

I have already created the tables with primary keys on each table and foreign keys linking each table to the next.

I tried to delete a row from the parent table and was given this error:


DELETE FROM [dbo].[DomNam]
WHERE [DomNam]=N' football '

Error: Query(1/1) DELETE statement conflicted with COLUMN REFERENCE constraint 'FK_DomNam'. The conflict occurred in database 'DomDB', table 'Dom_CatA', column 'DomNam'.

I tried to insert an alter table query:

ALTER TABLE dbo.DomNam
ADD CONSTRAINT FK_Dom_ID

REFERENCES dbo.Dom_CatA (Dom_ID)

ON DELETE CASCADE ON UPDATE CASCADE

But on Execute I saw this error:

Error]
Incorrect syntax for definition of the 'TABLE' constraint


What is wrong with the above syntax?


Or would it be better if I used a trigger instead because I already have foreign keys set within the tables?
If so please give an example of the syntax for the trigger I would need to update and cascade data from all tables.

I would be grateful for any advice. Thanks.

Hi

Have you missed something like this:

ALTER TABLE dbo.DomNamADD CONSTRAINT FK_Dom_IDFOREIGN KEY (Dom_ID)REFERENCES dbo.Dom_CatA (Dom_ID)ON DELETE CASCADE ON UPDATE CASCADE
Trigger could result such an error( DELETE statement conflicted with COLUMN REFERENCE constraint ..... ) either.

|||

(I need to be able to regularly, update or delete data from my parent table and subsequent child tables from A to Z, each table contains data.)

The above means what you are looking for require a trigger because Cascade On DELETE and UPDATE is DRI(declarative referential integrity), that means if A references B then B must exist, it is very clean simple relational Algebra, anything outside that you need a trigger. But you may have some columns that qualify for it, try the threads below for how to enable it. Hope this helps.


http://forums.asp.net/thread/1315554.aspx

http://forums.asp.net/thread/1120122.aspx

|||

Hi

Thanks guys for your reply and help.

I think that my problem is that I have created a many to many relationship without foreign key restraints.

On the parent table I have used the primary key from the first child table "A" as the foreign key.

The child tables are from A to Z.

With the first child table "A" I have used the Primary key from the parent as the foreign key.

With the child table "B" I have used the Primary key from the previous "A" table as the foreign key in "B" table. I have used the primary key as the foreign key in all subsequent tables without declaring referential integrity.

I know that in the very near future I will need to update and delete much of the records in these tables.

How do I remove the foreign keys so that I might be able to create a junction table, which I have since found that I need for a many to many table relationship. Or is there another easier way to do this?

Thanks

Lynn

|||

Hi guys

I have since learned how to delete the foreign keys.

I am viewing my SQL 2000 database using Aqua Data,

* Click on the last sibbling table.

* Click Alter table

* Select constrains tab

* Select FK + delete + OK

I have kept my Primary Keys in tact.

Now I need to relink my tables and ensure that I am able to cascade update or delete. All tables contain similar content, which will require updating or deleting often. Tables are from A to Z.. What is the best method to do this?

Thanks

Lynn

|||I have told you that all you can do is one to one referencing for DRI(declarative referential integrity) to work so if you have figured out the tables that qualify for if A references B then B must exist at the top of Enterprise Manager you will see enable relationship. And those that did not qualify you need a trigger. I hope I am very clear it is not DRI for A to Z but A to B. Hope this helps.|||

I just remembered I had a conversation with a database person who did not understand DRI(declarative referential integrity) so let me explain you have tables A to Z meaning 26 tables it means you can have only 13 DRIs that is 13 Cascade DELETE and Cascade UPDATE because it is a location based way to delete and update related data. So although foreign key is required to enable DRI not all foreign keys can be DRI.


You said the data is related that is DDL(data definition language) where relationship is determined by Upper and Lower bound Cardinality while DRI is DML(data manipulation language) keeping track of child data through one to one mapping if A references B then B must exist. I hope this makes it clear. You have to be careful with the ALTER TABLE ADD or DROP CONSTRAINT in 2000 because most ALTER must be done with Enterprise Manager or SQL Server 2000 will tell you it is wrong. One more thing you can use trigger to do it the way you want but triggers are resource intensive and may not fire all the time. Hope this helps.

http://www.microsoft.com/technet/prodtechnol/sql/2000/reskit/part10/c3761.mspx?mfr=true

|||

Hi Caddre

Thanks for the reply, as you have gathered I am not a sql database expert, I am trying to understand DRI.

The whole think would be easier if I had everything in the one table (but it would be too wide to manage) because the same column of data is repeated on every table A to Z., therefore data row of "John Smith" exists in all tables. But in the child tables "A" table for example "John Smith" has extra columns e.g. art, apples, auto, etc.,

Consequently if I remove or insert a row in parent table, the children need the same edit.

Would it be just as complicated if I created a new table "juntion table" and include all the primary key's from the parent and children tables as foreign keys in the junction table. Or would that not work?

Thanks

Lynn

|||

I am sorry I did not come to this thread to confuse you but what you are saying now is not relational, so I have found you two solutions you can add to valid DRI. I also think it is Microsoft documentation that confused you because in 2005 multiple Cascade is allowed but one table cannot be repeated twice that is the same thing I am saying. Hope this helps.

http://support.microsoft.com/kb/142480

http://msdn2.microsoft.com/en-us/library/aa224818(sql.80).aspx

OMG, Having so much trouble connecting my SQL database/server to Dreamweaver

I think its my server because I cant get it to link up to an Access data base
either, heres the error I get.
[DBNETLIB]ConnectionOpen (Connect()),]SQL Server does not exist or access
denied.
Im pretty sure that all the fields that I entered are correct though.
What could be the problem?
The connection string is right I believe. How do i configure the network
protocol?
Jean-Pierre Riehl wrote:[vbcol=seagreen]
>What is your connection string ?
>Have you configure the right network protocol in SQL Server Configuration
>Manager ?
>--
>Jean-Pierre Riehl
>http://www.blog.djeepy1.net
>http://www.bewise.fr
>[quoted text clipped - 6 lines]
|||To configure your allowable network protocols...
SQL 2000 you are going to use the "Server/Client Network Utilities" located
in your program files...
http://msdn2.microsoft.com/en-us/library/aa213770(SQL.80).aspx
Basically make sure that TCIIP is in the enabled box.
In SQL 2005 you can use your "Surface Area Configuration" Tool
http://msdn2.microsoft.com/en-us/library/ms173748.aspx
thanks,

/*
Warren Brunk - MCITP,MCTS,MCDBA
www.TechIntSolutions.com
www.RealWorldSQL.com
*/
"Qaiphyx" <u40439@.uwe> wrote in message news:7dcd267ca767e@.uwe...
> The connection string is right I believe. How do i configure the network
> protocol?
> Jean-Pierre Riehl wrote:
>

OMG, Having so much trouble connecting my SQL database/server to Dreamweaver

I think its my server because I cant get it to link up to an Access data base
either, heres the error I get.
[DBNETLIB]ConnectionOpen (Connect()),]SQL Server does not exist or access
denied.
Im pretty sure that all the fields that I entered are correct though.
What could be the problem?What is your connection string ?
Have you configure the right network protocol in SQL Server Configuration
Manager ?
--
Jean-Pierre Riehl
http://www.blog.djeepy1.net
http://www.bewise.fr
"Qaiphyx" <u40439@.uwe> wrote in message news:7dcaeb7bf1706@.uwe...
>I think its my server because I cant get it to link up to an Access data
>base
> either, heres the error I get.
> [DBNETLIB]ConnectionOpen (Connect()),]SQL Server does not exist or access
> denied.
> Im pretty sure that all the fields that I entered are correct though.
> What could be the problem?
>|||The connection string is right I believe. How do i configure the network
protocol?
Jean-Pierre Riehl wrote:
>What is your connection string ?
>Have you configure the right network protocol in SQL Server Configuration
>Manager ?
>--
>Jean-Pierre Riehl
>http://www.blog.djeepy1.net
>http://www.bewise.fr
>>I think its my server because I cant get it to link up to an Access data
>>base
>[quoted text clipped - 6 lines]
>> What could be the problem?|||To configure your allowable network protocols...
SQL 2000 you are going to use the "Server/Client Network Utilities" located
in your program files...
http://msdn2.microsoft.com/en-us/library/aa213770(SQL.80).aspx
Basically make sure that TCIIP is in the enabled box.
In SQL 2005 you can use your "Surface Area Configuration" Tool
http://msdn2.microsoft.com/en-us/library/ms173748.aspx
thanks,
/*
Warren Brunk - MCITP,MCTS,MCDBA
www.TechIntSolutions.com
www.RealWorldSQL.com
*/
"Qaiphyx" <u40439@.uwe> wrote in message news:7dcd267ca767e@.uwe...
> The connection string is right I believe. How do i configure the network
> protocol?
> Jean-Pierre Riehl wrote:
>>What is your connection string ?
>>Have you configure the right network protocol in SQL Server Configuration
>>Manager ?
>>--
>>Jean-Pierre Riehl
>>http://www.blog.djeepy1.net
>>http://www.bewise.fr
>>I think its my server because I cant get it to link up to an Access data
>>base
>>[quoted text clipped - 6 lines]
>> What could be the problem?
>

Wednesday, March 21, 2012

OleDBException Overflow

Im getting the following error :

System.Data.OleDb.OleDbException was unhandled

ErrorCode=-2147217833

Message="Overflow"

Source="Microsoft JET Database Engine"

StackTrace:

at

System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS

dbParams, Object& executeResult)

at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)

at

System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior,

Object& executeResult)

at

System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior

behavior, String method)

at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()

at

Home_Party_Solutions.PartyDBaseAccess.getCustomerID(Customer cust) in

C:\Documents and Settings\Andrew Buis.HAL\My Documents\Visual Studio

2005\Projects\Trunk\PartyDBaseAccess.vb:line 138

at

Home_Party_Solutions.Customer.getCustomerID(IPartyDBase& p_dbase)

in C:\Documents and Settings\Andrew Buis.HAL\My Documents\Visual Studio

2005\Projects\Trunk\Customer.vb:line 212

at

Home_Party_Solutions.PartyOrder.Done_Click(Object sender, EventArgs e)

in C:\Documents and Settings\Andrew Buis.HAL\My Documents\Visual Studio

2005\Projects\Trunk\PartyOrder.vb:line 150

at System.Windows.Forms.Control.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

at

System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons

button, Int32 clicks)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ButtonBase.WndProc(Message& m)

at System.Windows.Forms.Button.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at

System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32

msg, IntPtr wparam, IntPtr lparam)

at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

at

System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32

dwComponentID, Int32 reason, Int32 pvLoopData)

at

System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32

reason, ApplicationContext context)

at

System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32

reason, ApplicationContext context)

at System.Windows.Forms.Application.Run(ApplicationContext context)

at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()

at

Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()

at

Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[]

commandLine)

at

Home_Party_Solutions.My.MyApplication.Main(String[] Args) in

17d14f5c-a337-4978-8281-53493378c1071.vb:line 81

Basically I am inserting a row into a table. The sql line looks like :

Insert into Customer VALUES ('1', 'Jane', 'Doe', '123 Nowhere', 'Kalamazoo', 'MI', '49024', 'a@.a.com', '3335551234')

When I copy and paste the command into Access, it successfully adds the

row into the table. However, I am getting that error when I run

it in my program. I create the string, then this is the code I am

using :

command = New OleDbCommand

command = m_Connection.CreateCommand()

command.CommandText = tempString

Dim tempInt As Integer = -1

tempInt = command.ExecuteNonQuery()

At the last line, I get the overflow.

Just for clarification, the values are (Cust ID as long, firstName as

text, lastName as text, Street as text, City as text, State as text,

Zip as long, email as text, phone as double).

Any insights into the problem? The error message isnt all that insightful.

Thanks

Hi,

first of all name the columns which have to be inserted, this would provide much more concistence accross your code and will be much easier to maintain if error occur.

Do something like the following:

INSERT INTO TableName
(
COL1,
COL2
)
VALUES
(
1,
'2'
)

Perhaps this could already solve the problem or help you to find where the problem is located.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||Getting the same uninformative error when I try this.|||

You might want to try Data Access Tracing to find out what happened. Please see the link http://msdn2.microsoft.com/en-us/library/aa964124.aspx.

|||

Hi ab2034,

From the error code it seems you are getting the DB_E_DATAOVERFLOW error from the OLEDB provider. This error might be caused when "Literal value in the command exceeded the range of the type of the associated column.". So it means the provider did not like one or more of your values. I would recommend you to go ahead and try to use smaller input values and see if that works. I would start with the integral/double values first e.g. phone number. For example try putting 1 or 2 as the phone number values to see if that works and continue with other fields.

Thanks

Waseem

|||

Try
Insert into Customer VALUES (1, 'Jane', 'Doe', '123 Nowhere', 'Kalamazoo', 'MI', 49024, 'a@.a.com', 3335551234)

Rather than
Insert into Customer VALUES ('1', 'Jane', 'Doe', '123 Nowhere', 'Kalamazoo', 'MI', '49024', 'a@.a.com', '3335551234')

Or better yet, use placeholders and DbParameter to substitute values in sql string.

sql

OLEDB TRANSACTION MAKING DIFFERENCE and error is raised

OLEDB transaction is making difference in my migrated application powerbuilder 10.5 which has new oledb driver which is replaced by MSS driver in previous Powerbuilder version.

1.)I am facing the below error on update/save this was not faced during my previous versino drive MSS in powerbuilder.This is oocure only after the change to oledb driver.

"Row change between retrieve and update.".

in front end of my application the error is poped as

"(STD1007) This row has been modified by another user. Save is canceled! ".

Please help to resolve this error.

Are you seeing this error when using Integration Services? If so, can you give more information on all the database access (e.g. ExecuteSQL, OLE DB Destination) in your package? If not, and this is specific to Powerbuilder, then I would start by looking at any settings available in your front end for handling database changes and transaction isolation level. If you want to focus on the provider itself, you can ask your question on the SQL Server Data Access forum, but they will likely have to rely on you to know how Powerbuilder is using the provider under the covers.

OleDb Source Error - Connecting to Oracle 9i

Hi,
I have my datasource in Oracle9i and destination is Sql2005. I am connecting to Oracle 9i through OLEDb provider and when I connect to my DataSource using OLE DB Data Source, I get the following error:

Warning at "guid code": Cannot retreive the column code page info from the oledb provider. If the component supports the "DefaultCodePage" property, the code page from that property will be used. Change the value of the property if the current string code page values are incorrect. If the component does not support the property, the code page from the component's locale Id will be used.

Could anyone please help me trouble shoot this problem.

Regards,
Sudhakara.T.P.
sudhakaratp@.hotmail.com

Hi,

Click on the OLE DB Source component and check for the properties, you have to keep the property "Alwaysusedefaultcodepage" to true.

Hope this will help you.

Regards,

Raju

|||

Hi Raju,
Thank you very much for your help.
Well, I was not aware of this option and it helped me a lot to finish my work.

Regards,
Sudhakara.T.P.
sudhakaratp@.hotmail.com

Oledb Source adapter exception Error code: 0x80040E21

Hi

I am using Oledb Provider for Db2 from IBM. (There is another one from microsoft)

Through this provider I am constructing a oledb connection manager.

This connection manager I am Using in Oledb Source adapter.

Now when I set Data Access mode as Table or view I Am able to preview the data.

But when I use Data Access Mode as SQL Command try to preview I get this Error

TITLE: Microsoft Visual Studio

Error at s_NEWMAPPING10 [EMP [1]]: An OLE DB error has occurred. Error code: 0x80040E21.


ADDITIONAL INFORMATION:

Exception from HRESULT: 0xC0202009 (Microsoft.SqlServer.DTSPipelineWrap)


BUTTONS:

OK

I am not able to figure out how to resolve this.

I am receiving the exact same error. Can't run custom queries against the database and it is frustrating. Someone from Microsoft needs to respond to this immediately...it's not acceptable.sql

Oledb Source adapter exception Error code: 0x80040E21

Hi

I am using Oledb Provider for Db2 from IBM. (There is another one from microsoft)

Through this provider I am constructing a oledb connection manager.

This connection manager I am Using in Oledb Source adapter.

Now when I set Data Access mode as Table or view I Am able to preview the data.

But when I use Data Access Mode as SQL Command try to preview I get this Error

TITLE: Microsoft Visual Studio

Error at s_NEWMAPPING10 [EMP [1]]: An OLE DB error has occurred. Error code: 0x80040E21.


ADDITIONAL INFORMATION:

Exception from HRESULT: 0xC0202009 (Microsoft.SqlServer.DTSPipelineWrap)


BUTTONS:

OK

I am not able to figure out how to resolve this.

I am receiving the exact same error. Can't run custom queries against the database and it is frustrating. Someone from Microsoft needs to respond to this immediately...it's not acceptable.

OLEDB Providers

Hi,

I have a DTS package which is using OLEBD provider for Oracle, it was working fine. I tried to open this package and I got this error message "There was a problem retrieving the list of OLE DB Providers"

I tried to intall MDAC8.2, it didn't help, should I reinstall SQL Server?

Thanks!Where was the package working fine from, and where you were trying to open it from when you received an error?|||It was working from SQL Server 2000, I am trying it from same machine, same sql server and its not working.|||So you tried to install MDAC 8.2 on the SQL Server box? MDAC level on the server is controlled by service packs and should not be changed by any other way, like direct installation. MDAC is what SQL uses to talk to itself. If this is what you did, - at a minimum you need to have a reliable backup of your master, msdb, and user databases, because you may have to reapply SP3 (not sure that would do it), reinstall SQL (possibly will fix it), or reload the box.|||I tried to reinstall sql 2000 and service pack 3a but problem still exists. Is there any other option besides reloading the box?

Thanks!

Oledb Provider having problem in MS SQL Server 2005

Hi,

I try to access the table "UserGroup" in my local sql server 2005 database. However I get this error message
"Invalid object name 'UserGroup'. "

I'm using MS Visual Studio 2005 and MS Sql Server 2005. I did install the latest Sql Native. In fact I just migrate from ASP.NET to ASP.NET 2.0 . It is working if my connection string is point to my "online host" without any error.

'Online Connection String - Working
<addkey="OLEDB"value="Provider=SQLOLEDB.1;Persist Security Info=False;User ID=abc;Initial Catalog=mydatabase_db;Data Source=xxx.xx.xx.xx,xxxx; Password=xxxx;Connect Timeout=3600"/>

'Local Connection String - Not working
(SQL Authentication)
<addkey="OLEDB"value="Provider=SQLNCLI;Trusted_Connection=No;UID=calvin;Initial Catalog=mydatabase_db;Data Source=CALVINNB; Password=xxxxxx"/>
OR
(Windows Authentication)
<addkey="OLEDB"value="Provider=SQLNCLI;Server=CALVINNB;Database=mydatabase_db;Trusted_Connection=yes"/
Is the Oledb provider having problem in MS SQL Server 2005?

Any help would be more appreciate.

Calvin


First thing I would try it to make sure you do have a table named UserGroup, and also try prefixing with with the owner.

Next, you should be using the SQL provider and not the OLEDB providers for SQL Server.

|||Yes, I do have a table named UserGroup. If I change the OLEDB provider to SQL provider, then I have a lot of code need to be change and debug. Is there any way to solve this problem? And I don't understand why I use my "Online" connection string(bottom) without error? Even the provider isSQLOLEDB.1?

<addkey="OLEDB"value="Provider=SQLOLEDB.1;Persist Security Info=False;User ID=xxx;Initial Catalog=mydatabase_db;Data Source=xxx.xx.xx.xx,xxxx; Password=xxxxxx;Connect Timeout=3600"/>

The difference to my local connection is just the "UID", "Password" and Data Source only. I'm sure that the login account for local is created perfectly. The host and my computer also using MS SQL Server 2005.

|||

EDUStreet:

Yes, I do have a table named UserGroup. If I change the OLEDB provider to SQL provider, then I have a lot of code need to be change and debug.

OLEDB provider is meant to be used for older data sources. For SQL Server 7.0+ you should really be using the SQL Providers, that is what it is there for. In terms of coding changes there should not be too many apart from renaming all the declarations and instantiations from Oledb to Sql.

One of the best ways to make sure you got the right connection string is to drag and drop something like a gridview or sqldatasource and go through the wizard to connect to your datasouce and use the auto generated connection string

Here is a web site that has all connection string formats

http://www.connectionstrings.com/?carrier=sqlserver2005

|||

Finally, I change all the code which is from OLEDB provider to SQL provider

This is the connection string i'm using now.

<addkey="OLEDB"value="User ID=xxxx;Initial Catalog=mydatabase_db;Data Source=xxx.xx.xx.xx,xxxx; Password=xxxx"/>

|||

EDUStreet:

"The ConnectionString property has not been initialized. "

When you create the SqlConnection object you need to supply the connection string. Please ensure you have done this.

|||

Thanks Jimmy :)

Tuesday, March 20, 2012

OLEDB provider error.

Hi:

I have created a cube and deployed in sql server. I am trying to connect to analysis services to access cube with linked server. I am getting this error...how do i fix this.?

OLE DB provider "MSOLAP" for linked server "(null)" returned message "Errors in the OLE DB provider. The Extended Properties property is set to a value that is not supported.".

Msg 7373, Level 16, State 2, Line 1

Cannot set the initialization properties for OLE DB provider "MSOLAP" for linked server "(null)".

Thanks,

Pramod

What's your Extended Properties? Please check whether there is any typo.|||

Xinwei:

Extended properties for my database is null...

Thanks,

Pramod

|||

Just leave it blank like this: Extended Properties="".
What's your whole connection string?
Thanks.

|||

Xinwei:

This is the query i am using...

SELECT a.* FROM OPENROWSET( 'MSOLAP','DATASOURCE=PKUMAR\PKUMAR;

Initial Catalog=Analysis Services Project1;', 'SELECT Measures.members ON ROWS,

[Product Category].members ON COLUMNS FROM [Adventure Works Internet Sales]') as a

go

Thanks,

|||The problem is on the Extended Properities as the error msg stated. If you have nothing to specify, please try delete it.|||Yep...it didnt help|||I am moving this to the SQL Server Analysis Services Forum.

OLEdb Issue

I am getting the following error:
Error 2 An attempt has been made to use a data extension 'OLEDB' that is not
registered for this report server. C:\Documents and
Settings\Administrator.WILLCARE\My Documents\Visual Studio
2005\Projects\Willcare\Willcare\Report2.rdl 0 0
I am trying to design a report to use an OLEDB data source. the designer is
working, I can connect, design the report, preview. everything looks great.
but when i go to publish this, I get the error above.
Advice?found my own answer.
it appears SQL Express with RS is handicapped to SQL and LOCAL database
support only. not much use there IMHO...
"john doe" <jdoe@.doe.com> wrote in message
news:u60hYOBhGHA.3496@.TK2MSFTNGP02.phx.gbl...
>I am getting the following error:
> Error 2 An attempt has been made to use a data extension 'OLEDB' that is
> not registered for this report server. C:\Documents and
> Settings\Administrator.WILLCARE\My Documents\Visual Studio
> 2005\Projects\Willcare\Willcare\Report2.rdl 0 0
> I am trying to design a report to use an OLEDB data source. the designer
> is working, I can connect, design the report, preview. everything looks
> great. but when i go to publish this, I get the error above.
> Advice?
>

OLEDB error while trying to import MDB data into SQL 2005

Hello,

I am getting an error while trying to import data into SQL 2005 from an existing Access MDB database. When I try this on another workstation there are no problems and the data is imported successfully.

Could someone tell me what to look for or what setting I have incorrect. On the workstation with the problem I had removed SQL 2000 Personal Edition and installed SQL 2005 Standard Edition. Also, I have both Visual 2003 and 2005 installed on this workstation as well.

Thanks

TITLE: SQL Server Import and Export Wizard

Could not set up data flow connections.

The connection type "OLEDB" specified for connection manager "{DAE0A984-862B-4E4A-890E-8DB4860C9F6B}" is not recognized as a valid connection manager type. This error is returned when an attempt is made to create a connection manager for an unknown connection type. Check the spelling in the connection type name.

ADDITIONAL INFORMATION:

The connection type "OLEDB" specified for connection manager "{DAE0A984-862B-4E4A-890E-8DB4860C9F6B}" is not recognized as a valid connection manager type. This error is returned when an attempt is made to create a connection manager for an unknown connection type. Check the spelling in the connection type name.
({55FFB2C2-E461-4FDB-B3C4-EE4677B80C77})


BUTTONS:

OK

Operation stopped...

- Initializing Data Flow Task (Success)

- Initializing Connections (Success)

- Setting SQL Command (Success)

- Setting Source Connection (Error)

Messages

The connection "SourceConnectionOLEDB" is not found. This error is thrown by Connections collection when the specific connection element is not found.
({3DDD68E3-30A4-4513-B0AB-45F340BAB4C0})

- Setting Destination Connection (Stopped)

- Validating (Stopped)

- Prepare for Execute (Stopped)

- Pre-execute (Stopped)

- Executing (Stopped)

- Copying to [EJTest].[dbo].[Journal] (Stopped)

- Post-execute (Stopped)

- Cleanup (Stopped)

Did you ever figure out how to fix this. I had the same problem on my laptop, and I had to rebuild my laptop from scratch to fix it. I have another person with the same problem. I would like to fix this with out rebuilding.

Thanks

Michael Robey
mrobey@.worldinsco.com

|||This is a SSIS issue.|||

Yes it is a SSIS issue. Open SQL Server Configuration Manager. Right click on SQL Server Integration Services. Select properties and in the Log On tab change the built-in account.

It should be the same account you are using to run SQL Server. In my case is a standalone server for test/dev purpuse so I don't use Network account. I changed both to Local System. That should fix the issue.

|||

I had the same problem too.

Thanks Carlos, fixed it perfectly.

|||

I had the problem in general. Couldnt import tables from sql2000 / 2005 same and different databases.

Trough Your remark (Thank You) i fiddeld a little with the properties of SSIS and MSSQL Services. if both log on as the built in local system user,it works too. or local system and a Windows user of the machine, thats ok too.

I had posted this problem in

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=344363&SiteID=1

but never got a reaction from ms

With some combinations you can optionally save the package, with some the wizard throws an error.

A definite clarification from ms about the conditions would be very helpful.

Michael

|||It really solved the problem.
Thank you very much!!!
|||

Better late than never!

Your solution solved my issue as well.

Thank you very much!

|||

It worked for me as well,

I wanted to import a visual foxpro Database to SQL2005, I installed Visual Foxpro oledb (9.0) . but I got the Error message. I tried importing a MSAccess db and it gave me the same error. following up Carlos Instruction, It worked both for msAccess db and Foxpro OleDB

Thanks

|||

Please read the KB article http://support.microsoft.com/kb/913817

The SSIS service does not have to run as the same account as SQL Server instance. What helped you is that you've changed it to run as account with Administrator rights. While this does fixes the problem, it exposes you to unnecessary risks as you are granting the service more priviledges than it really needs.

It is better to fix the real cause as described in the article.

|||

It is working now!!!

THanks

|||Bingo! That did it. Thanks!