Showing posts with label update. Show all posts
Showing posts with label update. Show all posts

Thursday, March 29, 2012

General network error. Check your network documentation

When I try to update the site setting, I get this Error and I don't know how to fix.

Server Error in '/DotNetNuke' Application.
------------------------

General network error. Check your network documentation.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: General network error. Check your network documentation.

Source Error:

Line 281:
Line 282: myConnection.Open()
Line 283: myCommand.ExecuteNonQuery()
Line 284: myConnection.Close()
Line 285: End Sub

Source File: C:\DotNetNuke\Components\AdminDB.vb Line: 283

Stack Trace:

[SqlException: General network error. Check your network documentation.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +721
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +196
DotNetNuke.AdminDB.UpdatePortalInfo(Int32 PortalId, String PortalName, String PortalAlias, String LogoFile, String FooterText, Int32 UserRegistration, Int32 BannerAdvertising, String Currency, Int32 AdministratorId, String ExpiryDate, Double HostFee, Double HostSpace, String PaymentProcessor, String ProcessorUserId, String ProcessorPassword, String Description, String KeyWords, String BackgroundFile, Int32 SiteLogHistory) in C:\DotNetNuke\Components\AdminDB.vb:283
DotNetNuke.SiteSettings.Update_Click(Object sender, EventArgs e) in C:\DotNetNuke\admin\Portal\SiteSettings.ascx.vb:287
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()

------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Please Help!

Thank you,

dlouaniswrong forum buddy. That's a dotnetnuke addin.|||Did you look in the server's event log? There is probably more information there that could help you to track down the problem.

And actually, the Data Access forum would be a better place for this post, and yeah perhaps one of the DNN forums, but I don't have a problem with it being here for the time being.

Terri

General Network Error Check network documentation

Hi I get a "General Network Error Check network documentation" error sometimes, but its only while insert or update statements are fired while selects keep working perfectly.

The Error details are as follows:

General network error. Check your network documentation.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: General network error. Check your network documentation.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException: General network error. Check your network documentation.]

System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)

If once a update is fired from IDE it takes long to respond but once its done the error disappears.

Any body any Idea.

Monday, March 19, 2012

fundamentals

wonder why it did not update the thread...
just wanted some fundamentals cleared as i am new to sql server. can someone tell me where to find documentation (without doing much digging) on simple DDLs and DMLs
i am keen to work using sql than using enterprise managerBooks Online (BOL) is where you want to start.

Monday, March 12, 2012

Function update

A gentleman from here helped me to write a function to convert oracle
date to a MS Sql date.
Here is the link
http://groups.google.com/group/micr...r />
8Jm9ADFUU
Yr6IuaVp8r6Fxhin3IJmS3764Q
The previous function you wrote
CREATE FUNCTION dbo.to_date
(@.dt VARCHAR(50), @.dt_format VARCHAR(50))
RETURNS DATETIME
AS
BEGIN
RETURN
CONVERT(DATETIME,
CONVERT(CHAR(12),
CAST(
SUBSTRING(@.dt,PATINDEX('%YYYY%',@.dt_form
at),4)+
SUBSTRING(@.dt,PATINDEX('%MM%',@.dt_format
),2)+
SUBSTRING(@.dt,PATINDEX('%DD%',@.dt_format
),2) AS DATETIME)
,0)+
SUBSTRING(@.dt,PATINDEX('%HH%',@.dt_format
),2)+':'+
SUBSTRING(@.dt,PATINDEX('%MI%',@.dt_format
),2)+':'+
SUBSTRING(@.dt,PATINDEX('%SS%',@.dt_format
),2)+' '+
SUBSTRING(@.dt,PATINDEX('%AM%',@.dt_format
),2),9)
END
works for TO_Date( '12/27/1996 03:48:26 PM', 'MM/DD/YYYY HH:MI:SS AM')
I would like to modify your function for the data below
to_date('05/31/2000 10:17:22', 'MM/DD/YYYY HH24:MI:SS')
Can you help me to modify the function to work with the new format.
Thanks.Thanks. I figured it out. simple solution to just Return
convert(datetime,@.dt) without all the complexity.

Friday, March 9, 2012

function in a constraint

I want to make sure that only month end dates make it into the table. I coul
d
put if conditions in my insert/update stored procs or I could do that with a
constraint.
Is it possible to put a constraint in table that checks for certain
condition using user defined functions?
for example:
CREATE TABLE t1
(
c1 int,
mydate datetime
CONSTRAINT myconstraint month_end_check_function(mydate)
)
Where month_end_check_function is a function that returns true if c2 was
month end date such as 7/31/05 and would return false if c2 was 7/3/05.
TIA...sqlster,
SQL Server does support functions within a check constraint.
HTH
Jerry
"sqlster" <nospam@.nospam.com> wrote in message
news:48C643BE-FA2E-44C3-88DE-2C6596CDEAD1@.microsoft.com...
>I want to make sure that only month end dates make it into the table. I
>could
> put if conditions in my insert/update stored procs or I could do that with
> a
> constraint.
> Is it possible to put a constraint in table that checks for certain
> condition using user defined functions?
> for example:
> CREATE TABLE t1
> (
> c1 int,
> mydate datetime
> CONSTRAINT myconstraint month_end_check_function(mydate)
> )
> Where month_end_check_function is a function that returns true if c2 was
> month end date such as 7/31/05 and would return false if c2 was 7/3/05.
> TIA...
>|||On Fri, 7 Oct 2005 08:45:01 -0700, sqlster wrote:

>I want to make sure that only month end dates make it into the table. I cou
ld
>put if conditions in my insert/update stored procs or I could do that with
a
>constraint.
>Is it possible to put a constraint in table that checks for certain
>condition using user defined functions?
>for example:
>CREATE TABLE t1
>(
>c1 int,
>mydate datetime
> CONSTRAINT myconstraint month_end_check_function(mydate)
> )
>Where month_end_check_function is a function that returns true if c2 was
>month end date such as 7/31/05 and would return false if c2 was 7/3/05.
>TIA...
>
Hi sqlster,
Though Jerry is right - functions are permitted in a CHECK constraint -,
you don't need one here:
CREATE TABLE T1
(c1 int NOT NULL PRIMARY KEY,
mydate datetime,
CONSTRAINT (MONTH(mydate) <> MONTH(DATEADD(day, 1, mydate)))
)
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Nice job Hugo - thinkin outside the box!
"Hugo Kornelis" <hugo@.pe_NO_rFact.in_SPAM_fo> wrote in message
news:8vvdk159t9sefnbp02hn1rgsevlhqhdtu8@.
4ax.com...
> On Fri, 7 Oct 2005 08:45:01 -0700, sqlster wrote:
>
> Hi sqlster,
> Though Jerry is right - functions are permitted in a CHECK constraint -,
> you don't need one here:
> CREATE TABLE T1
> (c1 int NOT NULL PRIMARY KEY,
> mydate datetime,
> CONSTRAINT (MONTH(mydate) <> MONTH(DATEADD(day, 1, mydate)))
> )
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)|||Excellent (and creative) solution!
Gert-Jan
Hugo Kornelis wrote:
> Hi sqlster,
> Though Jerry is right - functions are permitted in a CHECK constraint -,
> you don't need one here:
> CREATE TABLE T1
> (c1 int NOT NULL PRIMARY KEY,
> mydate datetime,
> CONSTRAINT (MONTH(mydate) <> MONTH(DATEADD(day, 1, mydate)))
> )
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)

Sunday, February 26, 2012

Fun of INSTEAD OF UPDATE trigger

Hi All,
Here I have a view like this:
create view vw_Lcustkeycode as
select *, convert(bit,0) as IsArchived from dbo.Lcustkeycode
union all
select *, convert(bit,1) as IsArchived from
DataEntryArchive.dbo.aLcustkeycode
I created an INSTEAD OF UPDATE trigger like:
CREATE TRIGGER tr_update_2cols on vw_Lcustkeycode INSTEAD OF UPDATE
AS
BEGIN
if update(UserName) and update(DateModified) begin
update d
set d.UserName=i.UserName, d.DateModified=i.DateModified
from dbo.Lcustkeycode d
inner join inserted i on d.LCustKeycode_id=i.LCustKeycode_id
where i.IsArchived=0
update d
set d.UserName=i.UserName, d.DateModified=i.DateModified
from DataEntryArchive.dbo.aLcustkeycode d
inner join inserted i on d.LCustKeycode_id=i.LCustKeycode_id
where i.IsArchived=1
end
END
When I run following update in Query Analyzer (notice the lcustkeycode_id is
primary key so only 1 row should be affected):
update vw_LCustKeycode
set username='jamma', datemodified=getdate()
where lcustkeycode_id=111060167
It said:
(2 row(s) affected)
(1 row(s) affected)
(8 row(s) affected)
(0 row(s) affected)
(8 row(s) affected)
I check the data and they are correct and really only 1 row was updated, but
why it said so many rows were affected? I find there are no other trigers
sitting there except my instead of trigger.
Can anyone here explain this strange behaviour?
Thanks,
JamesJames Ma wrote:
> Hi All,
> Here I have a view like this:
> create view vw_Lcustkeycode as
> select *, convert(bit,0) as IsArchived from dbo.Lcustkeycode
> union all
> select *, convert(bit,1) as IsArchived from
> DataEntryArchive.dbo.aLcustkeycode
> I created an INSTEAD OF UPDATE trigger like:
> CREATE TRIGGER tr_update_2cols on vw_Lcustkeycode INSTEAD OF UPDATE
> AS
> BEGIN
> if update(UserName) and update(DateModified) begin
> update d
> set d.UserName=i.UserName, d.DateModified=i.DateModified
> from dbo.Lcustkeycode d
> inner join inserted i on d.LCustKeycode_id=i.LCustKeycode_id
> where i.IsArchived=0
> update d
> set d.UserName=i.UserName, d.DateModified=i.DateModified
> from DataEntryArchive.dbo.aLcustkeycode d
> inner join inserted i on d.LCustKeycode_id=i.LCustKeycode_id
> where i.IsArchived=1
> end
> END
> When I run following update in Query Analyzer (notice the
> lcustkeycode_id is primary key so only 1 row should be affected):
> update vw_LCustKeycode
> set username='jamma', datemodified=getdate()
> where lcustkeycode_id=111060167
> It said:
> (2 row(s) affected)
> (1 row(s) affected)
> (8 row(s) affected)
> (0 row(s) affected)
> (8 row(s) affected)
> I check the data and they are correct and really only 1 row was
> updated, but why it said so many rows were affected? I find there are
> no other trigers sitting there except my instead of trigger.
> Can anyone here explain this strange behaviour?
> Thanks,
> James
Look in Profiler and see what it's doing (look at SP:StmtCompleted
events in addition to SQL:StmtCompleted).
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Thanks for your quick reply. Just now I closed Query Analyzer and entered it
again, then the results become:
(1 row(s) affected)
(0 row(s) affected)
(1 row(s) affected)
Seems fine now. I can't explain what happened just now. Even when I set
nocount off, it retuned.
(2 row(s) affected)
(8 row(s) affected)
But now everything is fine.
"David Gugick" wrote:

> James Ma wrote:
> Look in Profiler and see what it's doing (look at SP:StmtCompleted
> events in addition to SQL:StmtCompleted).
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
>|||Hello, James
The extra "n row(s) affected" are probably a side effect of the "Show
execution plan" in Query Analyzer. Retry your query with this option on
and off to see if that's the problem.
Razvan

Friday, February 24, 2012

Full-text search does not automatically update index when CHANGE_TRACKING AUTO

On Sql Server 2005 Standard if I insert a new row into SomeTable that has a full-text index:

insert SomeTable(keywords)values('this is a test')

and then query:

SELECT * FROM Message WHERE Contains(keywords, ' "test" ');

I get the expected rows all rows that have "test" in the keyword.

On Sql Server 2005 Express new rows are not returned unless I rebuild the catalog.

Is this a known limitation of Express?

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

CREATE TABLE [dbo].[SomeTable](
[key] [int] IDENTITY(1,1) NOT NULL,
[keywords] [nvarchar](255) NOT NULL
CONSTRAINT [PK_SomeTable] PRIMARY KEY CLUSTERED

CREATE FULLTEXT CATALOG ft AS DEFAULT;

CREATE FULLTEXT INDEX ON [dbo].[SomeTable] KEY INDEX [PK_SomeTable] ON [ft] WITH CHANGE_TRACKING AUTO
ALTER FULLTEXT INDEX ON [dbo].[SomeTable] ADD ([keywords])
ALTER FULLTEXT INDEX ON [dbo].[SomeTable] ENABLE

Are you rebuilding the catalog everytime to get the new rows?