Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Wednesday, March 28, 2012

InvalidProgramException on Adapter.Fill

Hi,

Using VS2005, Framework 2 and SQL 2005 Mobile all from the recent launch in Australia, I have created a new Smartdevice project in c# and have created an SQL mobile database with 1 table in it.
I added a datasource/dataset referencing the mobile database and it displayed the table/columns etc in the Data Sources Pane.
I changed the table type to details, then dragged the table onto a blank form.
VS created the form well and all looked OK

When I deployed it to the Pocket PC 2003 SE emulator it built and started fine

But, when i clicked the menu item to open the database form i created, the line

int returnValue = this.Adapter.Fill(dataTable);

comes up with the error "InvalidProgramException was unhandled" and the thread terminates.

There are no more details in the error than that

Has anyone seen this before or have a solution?

Thanks in advance

Grant

This seems to have been an install issue, installing VS 2005 on another machine and doing the same thing did not result in the error

CHEERS

GRANT

Monday, March 26, 2012

Invalid stored procedures [How to check?]

I am on a development project where we are using SQL Server 2000 and using
almost exclusively stored procedures.
Because the team is all over the country we have run into a problem.
Because we are in the development/design phase things are changing as new
requirements are thrust upon us by managment.
Sometimes the datatype of table changes or a column is deleted. This makes
the stored procedure invalid. However, you don't know its invalid until you
access the stored procedure.
Is there a way to know that a stored procedure has become invalid or is
there a way to force a recompile so that you can see which stored procedure
now have problems?
Thanks!
EnzoPrior to posting my original message I read the portion of the BOL that you
pasted to this message.
The problem with sp_recompile is that it does not actually do the recompile!
It only marks it to be recompiled. What I want is way to actually
recompile all my stored procs without essentially dropping and recreating
them to find which ones are now invalid.
In Oracle and other DBMS system a recompile is an actuall recompile and not
simply marking a flag somewhere in the DD.
I guess the only way to do this is how we are doing it now which is to drop
and recreate every single stored proc.
"ilovesql" <ilovesql@.hotmail.com> wrote in message
news:ufC3E#kRDHA.2460@.TK2MSFTNGP10.phx.gbl...
> BOL:
> Recompiling a Stored Procedure
> As a database is changed by such actions as adding indexes or changing
data
> in indexed columns, the original query plans used to access its tables
> should be optimized again by recompiling them. This optimization happens
> automatically the first time a stored procedure is run after Microsoft®
SQL
> ServerT 2000 is restarted. It also occurs if an underlying table used by
the
> stored procedure changes. But if a new index is added from which the
stored
> procedure might benefit, optimization does not automatically happen (until
> the next time the stored procedure is run after SQL Server is restarted).
> SQL Server provides three ways to recompile a stored procedure:
> a.. The sp_recompile system stored procedure forces a recompile of a
> stored procedure the next time it is run.
>
> b.. Creating a stored procedure that specifies the WITH RECOMPILE option
> in its definition indicates that SQL Server does not cache a plan for this
> stored procedure; the stored procedure is recompiled each time it is
> executed. Use the WITH RECOMPILE option when stored procedures take
> parameters whose values differ widely between executions of the stored
> procedure, resulting in different execution plans to be created each time.
> Use of this option is uncommon, and causes the stored procedure to execute
> more slowly because the stored procedure must be recompiled each time it
is
> executed.
>
> c.. You can force the stored procedure to be recompiled by specifying
the
> WITH RECOMPILE option when you execute the stored procedure. Use this
option
> only if the parameter you are supplying is atypical or if the data has
> significantly changed since the stored procedure was created.
>
> Note If an object referenced by a stored procedure is deleted or renamed,
> an error is returned when the stored procedure is executed. If, however,
an
> object referenced in a stored procedure is replaced with an object of the
> same name, the stored procedure executes without having to be recompiled.
>
> To recompile a stored procedure next time it is run
> Transact-SQL
>
> See Also
> Creating a Stored Procedure
> Deferred Name Resolution and Compilation
> Executing a Stored Procedure
> Programming Stored Procedures
> "Enzo" <touringcarclub@.hotmail.com> wrote in message
> news:e$JHDbjRDHA.2148@.TK2MSFTNGP11.phx.gbl...
> > I am on a development project where we are using SQL Server 2000 and
using
> > almost exclusively stored procedures.
> >
> > Because the team is all over the country we have run into a problem.
> >
> > Because we are in the development/design phase things are changing as
new
> > requirements are thrust upon us by managment.
> >
> > Sometimes the datatype of table changes or a column is deleted. This
> makes
> > the stored procedure invalid. However, you don't know its invalid until
> you
> > access the stored procedure.
> >
> > Is there a way to know that a stored procedure has become invalid or is
> > there a way to force a recompile so that you can see which stored
> procedure
> > now have problems?
> >
> > Thanks!
> > Enzo
> >
> >
>
>

Invalid Report Source

I developed a project with a form one main report and three subreports.

I was able to run this report well in this project.

But if i include it in my main project it throws an error "Invalid Report Source" and my viewer is blank but the "Main Report" tab is there present.

I use dataset as the datasource for my crystal report.
If i use the dataset to fill my datagrid it is giving the value.

So with the situation i understand that the dataset is getting filled and the report is also geting the data. The error comes in the line

RptViewer.ReportSource = Rpt_Doc. '(Report Document Object)

One main thing is i have not used any error handler but the code still continue to work properly without being crashed.

If i give 'Try catch' error handler also i the same error is only prompted.

The main project was first developed in vs.net 2000 and the project was upgraded to 2003.

Will this be the reason for the report being giving the errorI got the solution through one of my friend.

she got it from another friend.

So that was a long chani to get the solution

the solution is

The error message appears because the incorrect versions of the Crystal DLL files are referenced.

To correct this behavior reference the correct version of Crystal DLL files.

Adding the Correct References
----------

1. Open the VS .NET project.

2. In the 'Solution Explorer' window, right-click the 'References' folder and choose the 'Add Reference' command. The 'Add Reference' window appears.

3. Verify the References for all Crystal DLLs are version 9.1.5000. If they are not version 9.1.5000, select the 9.1.5000 version DLLs and click the 'Select' button.

4. Click the 'OK' button.

5. Save and run your application.

If running the application you find the DLLs revert to the version observed prior to your updates, complete the following steps:

Reverting DLLs Back to Version 9.1.5000
------------

1. Right-click the project name in the solution explorer and select the 'Properties' command. The 'Properties' window appears.

2. Under the 'Common Properties' folder, select 'References Path'. The 'Reference Path' window appears.

3. Delete all entries in this window and click 'OK'.

4. Repeat steps 2 through 4 of the 'Steps to Add the Correct References Section'.

Upon completing the listed steps, the application runs and reflects the correct References.

she send me this thru my mail i have copied and pasted it here

so it may be helpful to other who visit this forum

Thanks a lot for all those who tried to solve this problem.

dont forget to rate my post

Monday, March 12, 2012

invalid column name rowguid

Hi all and I appreciate any help

I recently been assigned to a project that has an ms-access front end and sql server 2000 sp4 as the database engine.
The database was replicated (merge replication) but for some reason they drop replication and when they tried to put it back on they got allot of problems and so they paused it.
My task now is to make it work again. After allot of reading I desided to clean the database and start from the beginning. Using some scripts and instructions on a copy of the database I cleaned all the tables related to merge replication but when I went back to ms-access to update a record I got an error
"invalid column name 'rowguid'" . I checked all my tables in my database but I find not such column as it was dropped using the scripts.
Any ideas that I can use?

Thanks allot,
Georgehi ahain
Some more information
My version is:
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 23:18:38 Copyright (c) 1988-2003
Microsoft Corporation Personal Edition on Windows NT 5.1
(Build 2600: Service Pack 2)
SP4

The database I was given had a pull subscription on it that I removed. There is no table column rowguid in the ms-access code as I debuged and checked and there are no rowguid columns in the tables because they were cleaned.
My quess is that this message is an sql server exception.
If you need more information please ask me as these problem cannot let me move on.
I can try to clean the merge replication again if I' given some understantable guidance.
The database I'm working on has a pull merge subscription on it.
Thanks allot.

Sunday, February 19, 2012

Interop.DTS in SQL 2005?

Been given a vbs project that uses Interop.DTS object to dynamically create a DTS package for data transfer.

Will this code work on a SQL 2005 server?

I'm going to take a stab and say "no" because DTS is no longer shipped with SQL Server. Instead, the new product, SSIS is shipped with Standard, Enterprise, and Developer editions. SSIS contains its own API, of which Interop.DTS is not part of.|||Yeah, i'm assuming DTS isn't supported.|||The DTS runtime ships with SQL 2005 and is supported. It is an option during installation, and

the best thing about the DTS to SSIS migration story is that you can upgrade o SQL 2005, and DTS keeps working.

For more info try the documentation - Books Online - http://msdn2.microsoft.com/en-us/library/ms143706.aspx

Interop.DTS in SQL 2005?

Been given a vbs project that uses Interop.DTS object to dynamically create a DTS package for data transfer.

Will this code work on a SQL 2005 server?

I'm going to take a stab and say "no" because DTS is no longer shipped with SQL Server. Instead, the new product, SSIS is shipped with Standard, Enterprise, and Developer editions. SSIS contains its own API, of which Interop.DTS is not part of.|||Yeah, i'm assuming DTS isn't supported.|||The DTS runtime ships with SQL 2005 and is supported. It is an option during installation, and

the best thing about the DTS to SSIS migration story is that you can upgrade o SQL 2005, and DTS keeps working.

For more info try the documentation - Books Online - http://msdn2.microsoft.com/en-us/library/ms143706.aspx