Showing posts with label written. Show all posts
Showing posts with label written. Show all posts

Thursday, March 29, 2012

General network error. Check your network documentation

Hi We have a written a error log in Global.asax. which capture below mentioned error in the prodcution server. Same applications is working fine in some locations and some loactions we are getting the error.Any body knows why this error is occurs.Any body knows why this error is occurs. Error Message:General network error. Check your network documentation.Stack Trace: at System.Data.SqlClient.SqlInternalConnection.OpenAndLogin() at System.Data.SqlClient.SqlInternalConnection..ctor(SqlConnection connection, SqlConnectionString connectionOptions) at System.Data.SqlClient.SqlConnection.Open() at datalayer.sqldb.Execute(String ProcedureName, SqlParameter[] Parameters) at lms.User.GetUserDetails(String strUserid)ITs at LMS.Login.w_btn_Login_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)

Hello my friend,

Are you using forms authentication? If so, are you using a SQL Server Express database to handle the users and roles? If so, you need to change this so it uses a full proper SQL Server, not the Express version. I made a guess that you may be doing this because the error involves OpenAndLogin(). The Express version is just for development, not recommended for production. If I have guessed incorrectly, then I am sorry.

Kind regards

Scotty

|||

Hi Scotty,

Thanks for your information. But We are using SQL Server Enterprise edition. its full version. Please let me know if you have any information.

sql

Tuesday, March 27, 2012

General Network Error

Hi,
we have written a vb.net program using SQL Server 2000 SP4 over OLEDB.
Our customer has a network which is sometimes quite instable. So we did
some tests in our office, because we wanted to help our customer by
redisigning some of our SQL calls.
When we start the program and disconnect the network cable then the
next SQL query will result in a General Network Error, which is
logical.
When we start the program, then disconnect the network cable for about
ten seconds, then reconnect it, then the next SQL query will also
result in the same error, which we already cannot understand.
When we do the same as above, but before the next SQL query we close
the connection and reopen it, we still get the same error, which is
strange.
When we close, dispose and then recreate and open the connection, then
assign the connection to a new command and execute the SQL command, we
still get the same error.
When we stop the program and restart it, we can reconnect to the
database.
But when starting the program, we do nothing else than creating and
opening a connection. So why does it not work to reconnect while the
program is running?
Any explanations or suggestions?
Many thanks.
Daniel.
Dear Daniel,
I got the same error with u , Did u solve the problem?
thanks
From Agnes
*** Sent via Developersdex http://www.codecomments.com ***
|||Hi Agnes,
Unfortunately I never have got an answer to this post. I also posted
similar requests to other forums, but I never have got any answer. So
our problem still persists.
Regards.
Daniel.

General Network Error

Hi,
we have written a vb.net program using SQL Server 2000 SP4 over OLEDB.
Our customer has a network which is sometimes quite instable. So we did
some tests in our office, because we wanted to help our customer by
redisigning some of our SQL calls.
When we start the program and disconnect the network cable then the
next SQL query will result in a General Network Error, which is
logical.
When we start the program, then disconnect the network cable for about
ten seconds, then reconnect it, then the next SQL query will also
result in the same error, which we already cannot understand.
When we do the same as above, but before the next SQL query we close
the connection and reopen it, we still get the same error, which is
strange.
When we close, dispose and then recreate and open the connection, then
assign the connection to a new command and execute the SQL command, we
still get the same error.
When we stop the program and restart it, we can reconnect to the
database.
But when starting the program, we do nothing else than creating and
opening a connection. So why does it not work to reconnect while the
program is running?
Any explanations or suggestions?
Many thanks.
Daniel.Dear Daniel,
I got the same error with u , Did u solve the problem?
thanks
From Agnes
*** Sent via Developersdex http://www.codecomments.com ***|||Hi Agnes,
Unfortunately I never have got an answer to this post. I also posted
similar requests to other forums, but I never have got any answer. So
our problem still persists.
Regards.
Daniel.

General Database/Query and Form Design question

Currently working on an existing system written using an Access 2002 project
(.adp) and SQL Server 2000 and need to add some ehancements.
The system is a leasing system where a customer leases one or more assets
for a defined term (eg. 24, 36, 48 months...). Each lease may also be
associated with a fixed, or variable monthly repayment regime.
For example a customer wants to lease a Boat for 24 months for the first 12
months (period 1 - 12) they pay $50 per month, for period 13 - 18 they pay
$35 per month, and for the last 6 months (period 19 - 24) they pay $25 per
month.
The proposed table design is as follows:
tblLease
LeaseId int (identity) PK
CustomerId FK
TermId FK
...
tblLeaseAsset (1:M relationship to tblLease)
AssetId int PK
LeaseId int PK/FK to tblLease
AssetDescription
...
tblLeaseAssetRate (Intersection table - 1:M relationship to tblLeaseAsset,
1:M relationship to tblLeaseTerm)
AssetId int PK/FK
TermPeriodId int PK/FK
Payment decimal (19,4)
...
tblLeasePeriodTerm (1:M relationship to tblLease)
TermPeriodId int (identity) PK
LeaseId int FK to tblLease
FromTermPeriod small int
ToTermPeriod small int
...
Whilst the users are happy to enter the initial lease and period/term
information as a Parent/Main form and Child/Subform combination. They would
like to be able to enter the Asset and payment information together as a
single Child/Subform:
Period Period Period
Asset Description 1 - 12 13 - 18 19 - ...
A Boat $50 $35 $25
The problem is that this requires a pivot table/cross tabulation type view
of the data and these types of queries are not generally updatable.
Does anyone have any ideas how I might achieve the objective either in terms
of database, query or form design so that users can insert, update, delete
and view records?
Your assistance apreciated
Guy HortonWell, for each "asset", you got
AssetName AssetCost WherePurchased
Boat $15,000 WalMart
Car $5,000 MacDonalds
etc.
Now, just put another sub-form to the "right" of a above where you can enter
"many" values for each of the above.
If your cursor is in Boat, then you can enter:
Period Amount
1 - 12 $50
13 - 18 $35
etc.
I can think of "many" cases where you got a detail line, and need "many" for
that details. consider the QuickBooks when you write a single check, and a
split amount, you need to "split" out the funds to "many" values. So, the
solution is to make two side by side sub-forms.
Take a look at the following screen shots, and especially the last one where
I have a "classic" cheque "distribution" screen (for each check/person on
the left, I can enter "many" split values for that particlar amount
(donation in this example) on the right side...
http://www.members.shaw.ca/AlbertKa...ticles/Grid.htm
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@.msn.com
http://www.members.shaw.ca/AlbertKallal|||I'd strongly recommend Albert's way, but if you're absolutely forced to
doing it on the same line, you can try a few different things that I can
think of:
1. Play with Access' PivotTable features. I've never found them all that
useful, and very klunky to use, but it may get you where you're trying to
go. Don't ask me for more detailed info on how to do that, though, I
generally avoid PivotTables like the plague.
2. Implement a temporary table that goes across as you'd like it to, then
as each record is read/updated, transfer the values to/from the "real" table
in the OnCurrent and Before/AfterUpdate events.
3. Use an embedded control of some kind (Hierarchical FlexGrid?) to display
the data instead.
Good luck,
Rob
"Guy Horton" <guy.horton@.nospam.bigpond.com> wrote in message
news:%23RueVVwwFHA.2064@.TK2MSFTNGP09.phx.gbl...
> Currently working on an existing system written using an Access 2002
> project (.adp) and SQL Server 2000 and need to add some ehancements.
> The system is a leasing system where a customer leases one or more assets
> for a defined term (eg. 24, 36, 48 months...). Each lease may also be
> associated with a fixed, or variable monthly repayment regime.
> For example a customer wants to lease a Boat for 24 months for the first
> 12 months (period 1 - 12) they pay $50 per month, for period 13 - 18 they
> pay $35 per month, and for the last 6 months (period 19 - 24) they pay $25
> per month.
> The proposed table design is as follows:
> tblLease
> LeaseId int (identity) PK
> CustomerId FK
> TermId FK
> ...
> tblLeaseAsset (1:M relationship to tblLease)
> AssetId int PK
> LeaseId int PK/FK to tblLease
> AssetDescription
> ...
> tblLeaseAssetRate (Intersection table - 1:M relationship to tblLeaseAsset,
> 1:M relationship to tblLeaseTerm)
> AssetId int PK/FK
> TermPeriodId int PK/FK
> Payment decimal (19,4)
> ...
> tblLeasePeriodTerm (1:M relationship to tblLease)
> TermPeriodId int (identity) PK
> LeaseId int FK to tblLease
> FromTermPeriod small int
> ToTermPeriod small int
> ...
> Whilst the users are happy to enter the initial lease and period/term
> information as a Parent/Main form and Child/Subform combination. They
> would like to be able to enter the Asset and payment information together
> as a single Child/Subform:
> Period Period Period
> Asset Description 1 - 12 13 - 18 19 - ...
> A Boat $50 $35 $25
> The problem is that this requires a pivot table/cross tabulation type view
> of the data and these types of queries are not generally updatable.
> Does anyone have any ideas how I might achieve the objective either in
> terms of database, query or form design so that users can insert, update,
> delete and view records?
> Your assistance apreciated
> Guy Horton
>|||Albert,
Thank you for your excellent response. I reviewed your article and screen
shots and have to say they look very professional.
I briefly considered side by side subforms and agree with you that this is a
very workable option, and probably the option I will go with. Although, it
doesn't allow the users to view all lease rates for all the currently
visible leased assets, and they think of periods as running across as
opposed to down the form.
Your thoughts appreciated.
Best Regards,
Guy
"Albert D.Kallal" <PleaseNOOOsPAMmkallal@.msn.com> wrote in message
news:ukKGPmwwFHA.460@.TK2MSFTNGP15.phx.gbl...
> Well, for each "asset", you got
>
> AssetName AssetCost WherePurchased
> Boat $15,000 WalMart
> Car $5,000 MacDonalds
> etc.
> Now, just put another sub-form to the "right" of a above where you can
> enter "many" values for each of the above.
> If your cursor is in Boat, then you can enter:
> Period Amount
> 1 - 12 $50
> 13 - 18 $35
> etc.
> I can think of "many" cases where you got a detail line, and need "many"
> for that details. consider the QuickBooks when you write a single check,
> and a split amount, you need to "split" out the funds to "many" values.
> So, the solution is to make two side by side sub-forms.
> Take a look at the following screen shots, and especially the last one
> where I have a "classic" cheque "distribution" screen (for each
> check/person on the left, I can enter "many" split values for that
> particlar amount (donation in this example) on the right side...
> http://www.members.shaw.ca/AlbertKa...ticles/Grid.htm
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> pleaseNOOSpamKallal@.msn.com
> http://www.members.shaw.ca/AlbertKallal
>|||Robert,
Thank you for your response. I agree that Albert's solution is the probably
the most sensible way to go, and that PivotTable features are klunky to use.
Your thoughts appreciated
Guy
"Robert Morley" <rmorley@.magma.ca.no.freakin.spam> wrote in message
news:eYrGDpxwFHA.3756@.tk2msftngp13.phx.gbl...
> I'd strongly recommend Albert's way, but if you're absolutely forced to
> doing it on the same line, you can try a few different things that I can
> think of:
> 1. Play with Access' PivotTable features. I've never found them all that
> useful, and very klunky to use, but it may get you where you're trying to
> go. Don't ask me for more detailed info on how to do that, though, I
> generally avoid PivotTables like the plague.
> 2. Implement a temporary table that goes across as you'd like it to, then
> as each record is read/updated, transfer the values to/from the "real"
> table in the OnCurrent and Before/AfterUpdate events.
> 3. Use an embedded control of some kind (Hierarchical FlexGrid?) to
> display the data instead.
>
> Good luck,
> Rob
> "Guy Horton" <guy.horton@.nospam.bigpond.com> wrote in message
> news:%23RueVVwwFHA.2064@.TK2MSFTNGP09.phx.gbl...
>

Monday, March 26, 2012

General Advice - Timesheet application

So I have been tasked with converting a pilot timesheet application (written in Access) into an all singing all dancing web app. I'm planning on using SQL Server to provide some scale but wondered if anyone had any advice about processing time calcs.

I can of course use the smalldatetime datatype to store all the start at, finish at and elapsed hours times but wonderd if there was any comparative advantage to using numerics instead and converting to/from HH:MM representation.

Maybe I need to finally figure out how to create and use custom data types?

There's lots of math to do on these things once the data is captured for reporting and such and smalldattime looks like a fairly big waste of space for something that really only deals in hours.

Anyone doen things like this before? Any advice on what not to do?

many thanks

Steve1) Use datetime
2) If necessary, denormalize your datetime field converting them in several int fields. This method sometimes is used in DW environment (with a dimension time)

Monday, March 19, 2012

Functions?

WIthin SQL Server 2005, there are functions. This feature is new to me and I haven't found anyone that has written their own fucntions? I'm wondering if functions are written the same as stored procedures, and can a function be called from a stored procedure or even from within a query.

Yes SQL functions are pretty much like your VB or any other functions. They take one/more parameters return one value. You could also return a table from a function. You can call the function from a Query or even inside a stored procedure. You can read up Books On Line for more info. There are some built in functions too.|||

Functions are not new to SQL Server 2005, they were introduced in SQL Server 2000. Try the link below for answers about most known UDF. The site is run by a UDF expert. Hope this helps.

http://www.novicksoftware.com/UDFofWeek/UDF_FAQ.htm