Showing posts with label calls. Show all posts
Showing posts with label calls. Show all posts

Sunday, March 11, 2012

duff page in web dev

my page calls a stored procedure......

but it does not work.....

<%@.PageLanguage="C#"MasterPageFile="~/Masterhowit.master"Title="Untitled Page" %>

<%@.ImportNamespace="System.Net.Mail" %>

<%@.ImportNamespace="System.Data.SqlClient" %>

<scriptrunat="server">

protectedvoid Button1_Click(object sender,EventArgs e)

{

//.....sql insert statement for stored procedure...make active?

string numberintextbox = TextBox1.Text;

string yippyaddress = Request.UserHostAddress.ToString();

string dateandtime = DateTime.Now.ToString();

SqlDataSource Datast1000 = new SqlDataSource();

Datast1000.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionStringtodatast1000"].ToString();

Datast1000.InsertCommandType = SqlDataSourceCommandType.StoredProcedure;

Datast1000.InsertCommand = "givemeinserting";

Datast1000.InsertParameters.Add("@.mobiles", numberintextbox);

Datast1000.InsertParameters.Add("@.ipaddress", yippyaddress);

The page collects mobile tele numbers......ipaddress.....and DateTimeStamp

well should.

The stored procedure works fine when executed from the database explorer and asks for the parameters all ok.

The connection string is fine and matches the web config......all compiles ok but at run time makes the berp noise

then my... if else.... throws exception to say no database entry made.

//--kickout---for no upload

int rowsAffected = 0;

try

{

rowsAffected = Datast1000.Insert();

}

catch (Exception ex)

{

// this error page says sorry error and sends message to admin about failure

Server.Transfer("erroratgiveme.aspx");

}

finally

{

Datast1000 =null;

}

if (rowsAffected != 1)

{

// this page says sorry there has been an error loading..try again

Server.Transfer("erroratgiveloading.aspx");

}

else

{

//happy days...go to giveme

Server.Transfer("giveme.aspx");

}

----------------------

I feel the code is fine because I have played with it for hours.....made basic insert statements etc.

Now this all worked fine two months ago until I tried to build a second page with insert statements then

nada.

Left it whilst I learned how to use microsoft sql server management express. Now tried for days to find problem

with no luck......

Should anyone from up high be available i would be very greatfull

Does anyone know what this means below

-------------------

The thread 0xb58 has exited with code 0 (0x0).

A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Web.dll

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\st1000april7\c09871d0\14ed6cf9\App_Web_9nwdvyfr.dll', Symbols loaded.

A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll

An exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll but was not handled in user code

The program '[2652] WebDev.WebServer.EXE: Managed' has exited with code 0 (0x0).

Try to delete the Temporary files under the directory

'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

and rebuild and try the application

|||

Try to delete the Temporary files under the directory

'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

and rebuild and try the application

Delete all the folder under the specified path

|||

trying...trying..hold on|||

App_global.asax.compiled

App_global.asax.eo21_x31.0.cs

App_WebReferances.3-2oi4

App_Webreferances.compiled

hash.web

any of these?

Am i looking in the right place......did search for

TemporaryASP.NET Files

regards rich

|||

right found it and deleted all objects within the folder.....rerun application...still not doing

it...however I think you are close ......anything else to do?

|||

What error you are getting this time? Is it same please copy & paste the stack trace

|||

Well thats the problem.

there is no error.

asp thinks its done the job..... its just that no data is going into the db.

And there are no tipos......spent hours on that...

remember stored procedure works fine in database explorer.

Its as if my page data is all running fine its just not arriving at the database door.

I thought the page my have a corruption onit so made new page and deleted old one..still no good.

made an admin page and put onit a from view and gridview......all working fine at runtime and inserting data!

Also have form view on the fault page which is working fine.

its a no brainer

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\WebDev.WebServer.EXE', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\WebDev.WebHost\8.0.0.0__b03f5f7f11d50a3a\WebDev.WebHost.dll', No symbols loaded.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

Warning: Cannot debug script code. Script debugging is disabled for the application you are debugging. Please uncheck the 'Disable script debugging' option on the Internet Options dialog box (Advanced page) for Internet Explorer and restart the process.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.RegularExpressions\2.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\System.Transactions\2.0.0.0__b77a5c561934e089\System.Transactions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.JScript\8.0.0.0__b03f5f7f11d50a3a\Microsoft.JScript.dll', No symbols loaded.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\st1000april7\c09871d0\14ed6cf9\App_WebReferences.r9lj_2qs.dll', Symbols loaded.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\st1000april7\c09871d0\14ed6cf9\App_global.asax.lyflx3jz.dll', Symbols loaded.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\st1000april7\c09871d0\14ed6cf9\App_Web_zbstgaax.dll', Symbols loaded.

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\st1000april7\c09871d0\14ed6cf9\App_Web_masterhowit.master.cdcab7d2.nufeebfc.dll', Symbols loaded.

A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Web.dll

A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll

An exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll but was not handled in user code

The thread 0x534 has exited with code 0 (0x0).

A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Web.dll

A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll

An exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll but was not handled in user code

'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\st1000april7\c09871d0\14ed6cf9\App_Web_2itmrd10.dll', Symbols loaded.

The program '[780] WebDev.WebServer.EXE: Managed' has exited with code 0 (0x0).

|||

Its not looking good we can try one more thing Uninstall the

aspnet_regiis.exe -ua

and then reinstall using

aspnet_regiis.exe -i

Make sure you are in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ directory before u run the commands. Send me the Code Behind as Well

I appriciate you patienceBig Smile

|||

mmm dont seem to have that file aspnet_regiis.exe -ua

I have four aspnet_regiis.exe files.......one of which is the 2.0.50727

search did not find ...aspnet_regiis.exe -ua

......so what is worst case sinario...delete and reload web dev

this all worked with sql insert statement in feb but suddenly lost the plot

|||

No the aspnet_regiis.exe is a file and

aspnet_regiis.exe -ua is command line parameters you need to supply when u execute from command line

and after that again from the command prompt run aspne_regiis.exe -i

|||

derr

|||

Smile ? what was that

|||

need help to run that.....got a mate who can help

but cant see him till friday.

going to have to put this on hold I think till then....going to mark post as answer for you

thanks so much for help.....ill post back here when Ive done it.

again thanks so much

rich

|||

don't worry we need to resovle this issue...

Yes

Friday, February 24, 2012

DTS: Problems calling packages from package.

(SQL Server 2000, SP3a)
Hello all!
I have a DTS package, that I'll call "A", which calls another package "B". In A's Global
Variable (GV) space, I'm defining the following variables:
SourceServer
SourceDatabase
SourceUser
SourcePassword
DestinationServer
DestinationDatabase
DestinationUser
DestinationPassword
I also define these same GVs in B.
I have A define the values for the GVs and I believe that they should "propagate" to B by
placing these variables in the "Outer Package Global Variables" tab.
However, when I try to change a value from A, it's like B "remembers" the last successful
value that was used (it's not picking up the changed value).
Am I doing something wrong with respect to GVs and packages calling other packages?
Thanks!
John PetersonJohn
I think you will be better to put the question to DTS.newsgroup and also
look at www.sqldts.com .
Personally , I have been calling DTS Package from stored procedure which is
accepted a parameter for GV.
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:OSDjL$ETEHA.2480@.TK2MSFTNGP10.phx.gbl...
> (SQL Server 2000, SP3a)
> Hello all!
> I have a DTS package, that I'll call "A", which calls another package "B".
In A's Global
> Variable (GV) space, I'm defining the following variables:
> SourceServer
> SourceDatabase
> SourceUser
> SourcePassword
> DestinationServer
> DestinationDatabase
> DestinationUser
> DestinationPassword
> I also define these same GVs in B.
> I have A define the values for the GVs and I believe that they should
"propagate" to B by
> placing these variables in the "Outer Package Global Variables" tab.
> However, when I try to change a value from A, it's like B "remembers" the
last successful
> value that was used (it's not picking up the changed value).
> Am I doing something wrong with respect to GVs and packages calling other
packages?
> Thanks!
> John Peterson
>|||Thanks Uri...however, it *seems* like it's not working correctly in my case. :-(
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:O3NZtGFTEHA.2944@.tk2msftngp13.phx.gbl...
> John
> I think you will be better to put the question to DTS.newsgroup and also
> look at www.sqldts.com .
> Personally , I have been calling DTS Package from stored procedure which is
> accepted a parameter for GV.
>
> "John Peterson" <j0hnp@.comcast.net> wrote in message
> news:OSDjL$ETEHA.2480@.TK2MSFTNGP10.phx.gbl...
> > (SQL Server 2000, SP3a)
> >
> > Hello all!
> >
> > I have a DTS package, that I'll call "A", which calls another package "B".
> In A's Global
> > Variable (GV) space, I'm defining the following variables:
> >
> > SourceServer
> > SourceDatabase
> > SourceUser
> > SourcePassword
> > DestinationServer
> > DestinationDatabase
> > DestinationUser
> > DestinationPassword
> >
> > I also define these same GVs in B.
> >
> > I have A define the values for the GVs and I believe that they should
> "propagate" to B by
> > placing these variables in the "Outer Package Global Variables" tab.
> >
> > However, when I try to change a value from A, it's like B "remembers" the
> last successful
> > value that was used (it's not picking up the changed value).
> >
> > Am I doing something wrong with respect to GVs and packages calling other
> packages?
> >
> > Thanks!
> >
> > John Peterson
> >
> >
>|||A better question might be, what exactly do the two tabs do? That is, if I want to
propagate my out (caller) package's GVs to the inner (callee), do I do that from the Outer
Package tab? Or should that be done from the Inner Package tab?
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:eyt8UOFTEHA.2692@.TK2MSFTNGP09.phx.gbl...
> Thanks Uri...however, it *seems* like it's not working correctly in my case. :-(
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:O3NZtGFTEHA.2944@.tk2msftngp13.phx.gbl...
> > John
> > I think you will be better to put the question to DTS.newsgroup and also
> > look at www.sqldts.com .
> >
> > Personally , I have been calling DTS Package from stored procedure which is
> > accepted a parameter for GV.
> >
> >
> > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > news:OSDjL$ETEHA.2480@.TK2MSFTNGP10.phx.gbl...
> > > (SQL Server 2000, SP3a)
> > >
> > > Hello all!
> > >
> > > I have a DTS package, that I'll call "A", which calls another package "B".
> > In A's Global
> > > Variable (GV) space, I'm defining the following variables:
> > >
> > > SourceServer
> > > SourceDatabase
> > > SourceUser
> > > SourcePassword
> > > DestinationServer
> > > DestinationDatabase
> > > DestinationUser
> > > DestinationPassword
> > >
> > > I also define these same GVs in B.
> > >
> > > I have A define the values for the GVs and I believe that they should
> > "propagate" to B by
> > > placing these variables in the "Outer Package Global Variables" tab.
> > >
> > > However, when I try to change a value from A, it's like B "remembers" the
> > last successful
> > > value that was used (it's not picking up the changed value).
> > >
> > > Am I doing something wrong with respect to GVs and packages calling other
> > packages?
> > >
> > > Thanks!
> > >
> > > John Peterson
> > >
> > >
> >
> >
>|||From this article: http://www.winnetmag.com/SQLServer/Article/ArticleID/19747/19747.html
<Quote>
Inside the Execute Package task, you can easily pass global variables to the child
package, as Figure 1 shows. If you click the Inner Package Global Variables tab in the
Execute Package task, DTS scans the child package for any global variables that it
expects, and you can set them to your own values. Inner global variables let you set the
global variables for the child package from the Execute Package task. Inner global
variables are useful when you're calling auditing packages and you want to pass to the
child package certain errors based on events in the parent package. Outer global variables
send global variables from the parent package to the child package. If a global variable
exists in the child package, DTS updates the child's global variable to the parent's
value. If the global variable doesn't exist in the child package, DTS creates it.
</Quote>
It would *seem* that my understanding of this is accurate. Though, clearly I'm still
doing something wrong...
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:OvKJxQFTEHA.2692@.TK2MSFTNGP09.phx.gbl...
> A better question might be, what exactly do the two tabs do? That is, if I want to
> propagate my out (caller) package's GVs to the inner (callee), do I do that from the
Outer
> Package tab? Or should that be done from the Inner Package tab?
>
> "John Peterson" <j0hnp@.comcast.net> wrote in message
> news:eyt8UOFTEHA.2692@.TK2MSFTNGP09.phx.gbl...
> > Thanks Uri...however, it *seems* like it's not working correctly in my case. :-(
> >
> >
> > "Uri Dimant" <urid@.iscar.co.il> wrote in message
> > news:O3NZtGFTEHA.2944@.tk2msftngp13.phx.gbl...
> > > John
> > > I think you will be better to put the question to DTS.newsgroup and also
> > > look at www.sqldts.com .
> > >
> > > Personally , I have been calling DTS Package from stored procedure which is
> > > accepted a parameter for GV.
> > >
> > >
> > > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > > news:OSDjL$ETEHA.2480@.TK2MSFTNGP10.phx.gbl...
> > > > (SQL Server 2000, SP3a)
> > > >
> > > > Hello all!
> > > >
> > > > I have a DTS package, that I'll call "A", which calls another package "B".
> > > In A's Global
> > > > Variable (GV) space, I'm defining the following variables:
> > > >
> > > > SourceServer
> > > > SourceDatabase
> > > > SourceUser
> > > > SourcePassword
> > > > DestinationServer
> > > > DestinationDatabase
> > > > DestinationUser
> > > > DestinationPassword
> > > >
> > > > I also define these same GVs in B.
> > > >
> > > > I have A define the values for the GVs and I believe that they should
> > > "propagate" to B by
> > > > placing these variables in the "Outer Package Global Variables" tab.
> > > >
> > > > However, when I try to change a value from A, it's like B "remembers" the
> > > last successful
> > > > value that was used (it's not picking up the changed value).
> > > >
> > > > Am I doing something wrong with respect to GVs and packages calling other
> > > packages?
> > > >
> > > > Thanks!
> > > >
> > > > John Peterson
> > > >
> > > >
> > >
> > >
> >
> >
>