An Sql Command That Does't Work In A Page

Jan 28, 2007

Hello, 

I have a sequense of sql commands in order to recursively update a table that has parents/childs

After I create a temporary table, I need to run an sql command that for some reason is not working. No errors, the command is actually excecuted, but I beieve the rowcount is 0 from the beggining

Here is the command:

Dim InsertConnection As Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection("Server=myServer;User ID=myUser;pwd=myPSW;Database=myDatabase")

Dim SqlInsertCommand As Data.SqlClient.SqlCommand = New Data.SqlClient.SqlCommand("while @@rowcount > 0 " _

& "begin INSERT INTO submenu" _

& uid & " (pageid,parentid) SELECT y.pageid , y.parentid FROM submenu" & uid _

& " i INNER JOIN page y ON y.ParentId = i.pageID LEFT OUTER JOIN subMenu" _

& uid & " i1 ON i1.pageId = y.pageId WHERE(i1.pageID Is NULL) " _

& "end", InsertConnection)

InsertConnection.Open()

SqlInsertCommand.ExecuteNonQuery()

InsertConnection.Close()

SqlInsertCommand = Nothing


If I insert any other SQLcommand there it is excecuted normally.

The command I have is excecuted fine using sql server manager.

Is there any way that a command is excecuted in the SQL manager but not in a page...??

Any ideas would be great...

 Thank you

View 6 Replies


ADVERTISEMENT

DBCC SHRINKFILE: Page 4:11283400 Could Not Be Moved Because It Is A Work Table Page.

Jul 20, 2007



Hi,



I issued this command on Tempdb but it doesnot shrink the file.



dbcc shrinkfile (tempdev_3,1)

go



Messages:

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

DBCC SHRINKFILE: Page 4:11283400 could not be moved because it is a work table page.

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



I have checked that there are no tables associated with any user in tempdb. Any help is appreciated.



Regards,

Razi

View 15 Replies View Related

Does Not Work On Page

Jun 5, 2007

I can test it in query builder but when i preview the page and go to do the search i get nothing
Here is my statement
SELECT     Employees.Last_Name, Employees.First_Name, Job_Transaction.Name, Seq_Descript.Seq_DescriptionFROM         Call_List INNER JOIN                      Call_Group ON Call_List.Group_ID = Call_Group.Group_ID AND Call_List.Group_ID = Call_Group.Group_ID INNER JOIN                      Employees ON Call_List.Clock = Employees.Clock INNER JOIN                      Job_Transaction ON Call_Group.Group_ID = Job_Transaction.Group_ID INNER JOIN                      Seq_Descript ON Call_List.Sequence = Seq_Descript.SequenceWHERE     (Call_List.Clock = @Clock)
Mike

View 2 Replies View Related

SET RECOVERY Command Does Not Work / Help Please

Jun 7, 2004

Hi

I want set the recovery model to SIMPLE via an ASP page

my DB is on the web

i used this code in my ASP page

strSQL = "ALTER DATABASE dbname SET RECOVERY SIMPLE"

and when i run it

nothing happen and the Recovery ramain FULL model
==========================

Please tell me is this a correct code
if not please tell me the correct code for ASP
until i change the Recovery Model to SIMPLE


Thanks

View 2 Replies View Related

Does No_TRUNCATE Command Work In SQL 7 ?

Feb 23, 2001

Hello,

I am planning to backup my log files to DLT and to disk on a regular basis. I was planning to issue a "backup log xxxxDB to device with NO_truncate" and then issue a "backup log xxxxxDB to DLT_device".

I have tried this but noticed that the size of file produced from the first command was greater than produced by the second command. It seems that the NO_truncate command is actually truncating the Log.

I am using SQL 7 and SP2 and truncate log on checkpoint option is switched off.

Can anyone shed light on this.

Thanks in advance.

Samir

View 1 Replies View Related

Page Break Does Not Work

Mar 19, 2008



Hi,
I am planning to put some page break in my SQL 2005 report using Table Property-general tab and it does not have any effect, if I select INSERT PAGE BREAK or not.
It gives a page brreak byitself and when I print the data in PDF, it gives extra page breaks arbirtory.

Can someone please help me.

thanks

View 4 Replies View Related

Bcp Command Won't Work At Query Analyzer

Nov 8, 2007

Hi all,

I have a script to bulk copy data from my table into textfile. This bcp script will be executed by xp_cmdshell. When I try to execute the scipt inside query windows it returned an error : Error = [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. But when I test the bcp script in command prompt it will execute successfully

Is there any misconfiguration ? (I'm using sqlexpress) thanks in advance.


Best regards,


Hery

View 9 Replies View Related

Cant Get Reports Server Page To Work

Jan 19, 2007

hi I have sql 2005 Standard on WinXP and i cant get http://localhost/ReportServer to work.
I get the web page error
Server Application Error
The server has encountered an error while loading an application during the
processing of your request. Please refer to the event log for more detail
information. Please contact the server administrator for assistance.

I have re-installed sql 2005, reinstalled IIS .
I have run the aspnet_regiis -i and still nothing.

Please someone, anyone , help.

View 7 Replies View Related

Installed SQL Express And Now Front Page Won't Work.

Nov 24, 2006

A couple of weeks ago I installed SQL Express on a system that also has VS 2005, Front Page and other applications. Now the Front Page application can no longer connect to the web server and I keep getting a message:

Server error: Error 2 opening registry key "SOFTWAREMicrosoftShared ToolsWeb Server ExtensionsPortsPort 80".

Has anyone else seen this error? Any suggestions on resolving this.

I did try a reinstall of Front Page and the error is still there.

John

View 3 Replies View Related

Manually Defined Delete Command Doesn't Work

Feb 16, 2008

Hi,
 i defined a sqldatasource in VWD manually (option specify sql statement) because several tables are involved. I also need a Delete statement, so i defined it also manually.
The select and delete statement are :
 <asp:SqlDataSource ID="SqlDataSource1" runat="server"            ConnectionString="<%$ ConnectionStrings:test %>"                       SelectCommand="SELECT aspnet_Users.UserName as lid, aspnet_Roles.RoleName            as categorie, aspnet_Users.beheerder as beheerder, aspnet_Membership.Email as emailadres FROM aspnet_Users INNER JOIN            aspnet_Membership ON aspnet_Users.UserId = aspnet_Membership.UserId INNER JOIN            aspnet_UsersInRoles ON aspnet_Users.UserId = aspnet_UsersInRoles.UserId inner JOIN            aspnet_Roles ON aspnet_UsersInRoles.RoleId = aspnet_Roles.RoleId order by username"
           DeleteCommand="delete from aspnet_users where userid=@userid">            <DeleteParameters>                <asp:Parameter Name="userid" />            </DeleteParameters>       </asp:SqlDataSource>
My problem is that the Select works, but not the Delete.
Any idea why?
Thanks
tartuffe

View 2 Replies View Related

SQL CE 3.5, VS 2008 Beta2: Could Not Get A Simple INSERT Command To Work!

Sep 13, 2007

Hello,

I have installed VS 2008 Beta 2 which includes SQL CE 3.5, (I have VS 2005 installed too).

I can not get any INSERT command to work!

First i have tried the VS wizard for a new connection and a dataset. but after inserting a row into one of the dataset tables and then updating it to SQL CE with tha data adapter, nothing happens! NO ERROR and NO inserted row in the database file! so the identity of the inserted row in dataset table doesnt get updated.

Then i tried a simple code without any dataset in a clean solution:





Code Snippet

Dim con As New SqlCeConnection("Data Source=|DataDirectory|MyDatabase#1.sdf")
Dim cmd As New SqlCeCommand("INSERT INTO [Table1](Name) VALUES('TestValue')", con)
Try
con.Open()
cmd.ExecuteNonQuery()
Catch ex As SqlCeException
MessageBox.Show(ex.Message)
Finally
con.Close()
End Try
NO ERROR! NO INSERTED ROW! Nothing happen!

I'm using it in a desktop application.

Why?

Regards,
Parham.

View 5 Replies View Related

SQL Cache Dependency Invalidation - Can It Work On The Procedure Based Command?

Dec 19, 2005

I was wondering if SQL Cache Dependency would be in fact invalidated if:
1.  it was created based on a procedure type command.
2. if the select statement retrieves the data from multiple database tables
 Any help would be more appreciated.  I am stuck with the fact that none of the data bases on sql dependency is invalidated. I spent literally hours to understand what i am doing incorrectly.
 
Thanks

View 1 Replies View Related

Reporting Services :: Home Page Of 2014 Doesn't Work

Nov 24, 2015

I installed Reporting Services 2014 on Windows 7. When i am trying to start home page i can see only HTML page and the text: "localhost/reports - /",then double lines (<hr><hr>) and text "Microsoft SQL Server Reporting Services Version 12.0.4100.1"Maybe the windows user (SERVER_NAMEADMINISTRATOR) has not sufficient permissions ?

View 3 Replies View Related

Error: Button Click Is Undefined - Simple If Statement With Sql Command Wont Work (c#)

Feb 2, 2008

hello it seems lack of c# skills is getting the better of me here...iv been trying to get this to work for hours now without success. I have just started working in c# so i am a beginner :)
all i want to do it query the database, check to see if a title exists, if yes then populate textbox saying 'title in use' but if the title doesnt exists then continue executing rest of code to add the title.
You'll notice iv tried to use string variables and sqlDataAdapter but i cant get these to work either...please help
so far i have this that keeps giving me the error that my button click is undefined: protected void bookButton_Click(object sender, EventArgs e){
//string title;try{SqlConnection conn1 = new SqlConnection();
conn1.ConnectionString =
"Data Source=Gemma-PC\SQLEXPRESS;" +"Initial Catalog=SoSym;" +
"Integrated Security=SSPI;";SqlCommand findTitle = new SqlCommand("SELECT title FROM Publication WHERE title='" + titleTextBox.Text + "';", conn1);
 
conn1.Open();
findTitle.ExecuteNonQuery();
 /*
DataSet myDataSetTitle = new DataSet("PublicationTitle");
myDataSetTitle.Clear();
myDataAdapterTitle.Fill(myDataSetTitle);//myDataSet contains results from above SELECT statement
title = myDataSetTitle.Tables[0].Rows[0]["title"].ToString();*/
}catch(Exception ex)
{TitleInvalidMessage.Text = "Title Not Accepted: This title is already in use by another publication" +ex.Message;
}
//title does not exist in table so continue and add to database
//rest of code here

View 5 Replies View Related

Changing Code Page Property Using Property Expression Doesn't Work

Jun 16, 2006

I am having problems exporting data into a flat file using specific code page. My application has a variable "User::CodePage" that stores code page value (936, 950, 1252, etc) based on the data source. This variable is assigned to the CodePage property of desitnation file connection using Property expression.

But, when I execute the package, the CodePage property of the Destination file connection defaults to the initial value that was set for "User:CodePage" variable in design mode. I checked the value within the variable during runtime and it changes correctly for each data source. But, the property of the destinatin file connection doesn't change and results in an error.

[Flat File Destination [473]] Error: Data conversion failed. The data conversion for column "Column01" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

[DTS.Pipeline] Error: The ProcessInput method on component "Flat File Destination" (473) failed with error code 0xC02020A0. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.

If I manually update the variable with correct code page and re-run the ETL, everything works fine. Just that it doesn't work during run-time mode.

Can someone please help me resolve this.

Thanks much.

View 5 Replies View Related

Reporting Services :: All Record Are Displaying On One Page - How To Display Page By Page

Nov 11, 2015

I have created one reports but all the records are displaying on one page.find a solution to display the records page by page. I created the same report without group so the records are displaying in page by page.

View 3 Replies View Related

I Need To Pass Data Entered /created On The First Page To The Next Page And Populate The Next Page With Some Data From The Fir

Nov 28, 2006

Hello I have a project that uses a large number of MS Data access pages created in Access 2003 and runs on MS SQL2005.

When I am on lets say my client, (first page in a series) data access page and I have completed the fields in the (DAP), I am directing my users to the next step of the registration process by means of a hyperlink to another Data access page in the same web but in a linked or sometimes different table.


I need to pass data entered /created on the first page to the next page and populate the next page with some data from the first page / table. (like staying on the client name and ID when i go to the next page)


I also need the first data access page to open and display a blank or new record. Not an existing record. I will also be looking to creata a drop down box as a record selector.


Any pointers in the right direction would be appreciated.
I am some what new to data access pages so a walk through would be nice but anything you got is welcome. Thanks Peter€¦

View 2 Replies View Related

Defining Command,commandtype And Connectionstring For SELECT Command Is Not Similar To INSERT And UPDATE

Feb 23, 2007

i am using visual web developer 2005 and SQL 2005 with VB as the code behindi am using INSERT command like this        Dim test As New SqlDataSource()        test.ConnectionString = ConfigurationManager.ConnectionStrings("DatabaseConnectionString1").ToString()        test.InsertCommandType = SqlDataSourceCommandType.Text        test.InsertCommand = "INSERT INTO try (roll,name, age, email) VALUES (@roll,@name, @age, @email) "                  test.InsertParameters.Add("roll", TextBox1.Text)        test.InsertParameters.Add("name", TextBox2.Text)        test.InsertParameters.Add("age", TextBox3.Text)        test.InsertParameters.Add("email", TextBox4.Text)        test.Insert() i am using UPDATE command like this        Dim test As New SqlDataSource()        test.ConnectionString = ConfigurationManager.ConnectionStrings("DatabaseConnectionString").ToString()        test.UpdateCommandType = SqlDataSourceCommandType.Text        test.UpdateCommand = "UPDATE try SET name = '" + myname + "' , age = '" + myage + "' , email = '" + myemail + "' WHERE roll                                                         123 "        test.Update()but i have to use the SELECT command like this which is completely different from INSERT and  UPDATE commands   Dim tblData As New Data.DataTable()         Dim conn As New Data.SqlClient.SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Database.mdf;Integrated                                                                                Security=True;User Instance=True")   Dim Command As New Data.SqlClient.SqlCommand("SELECT * FROM try WHERE age = '100' ", conn)   Dim da As New Data.SqlClient.SqlDataAdapter(Command)   da.Fill(tblData)   conn.Close()                   TextBox4.Text = tblData.Rows(1).Item("name").ToString()        TextBox5.Text = tblData.Rows(1).Item("age").ToString()        TextBox6.Text = tblData.Rows(1).Item("email").ToString()       for INSERT and UPDATE commands defining the command,commandtype and connectionstring is samebut for the SELECT command it is completely different. why ?can i define the command,commandtype and connectionstring for SELECT command similar to INSERT and UPDATE ?if its possible how to do ?please help me

View 2 Replies View Related

Using A Variable In SSIS - Error - Command Text Was Not Set For The Command Object..

Nov 4, 2006

Hi All,

i am using a OLE DB Source in my dataflow component and want to select rows from the source based on the Name I enter during execution time. I have created two variables,

enterName - String packageLevel (will store the name I enter)

myVar - String packageLevel. (to store the query)

I am assigning this query to the myVar variable, "Select * from db.Users where (UsrName = " + @[User::enterName] + " )"

Now in the OLE Db source, I have selected as Sql Command from Variable, and I am getting the variable, enterName,. I select that and when I click on OK am getting this error.

Error at Data Flow Task [OLE DB Source [1]]: An OLE DB error has occurred. Error code: 0x80040E0C.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E0C Description: "Command text was not set for the command object.".

Can Someone guide me whr am going wrong?

myVar variable, i have set the ExecuteAsExpression Property to true too.

Please let me know where am going wrong?

Thanks in advance.








View 12 Replies View Related

Expression After Table Object Forced To Display On The Last Page Even There Are Still Spaces At The Bottom Of The First Page.

Oct 16, 2006

The following objects are placed on the Report body of the Report pane of SQL Server 2005 Reporting Services :

<textbox: expression1>
<textbox: expression2>

<table:table1 with at least 30 columns and 30 expressions>

<textbox: string1> - considered as the Title in the Footer section of the report

<texbox:string2> <textbox:expression3>
<textbox:string3> <textbox:expression4>
<textbox:string4> <textbox:expression5>
<textbox:expression6>

I can't find any explanation why is it string1 and string 2 of the footer section of my report displayed separately from the expression3 which is aligned on it and the rest of the object on the second page.

The expected design is that all Footer items should be displayed together of whether it is placed on the first page or on the last page.

As a workaround of this, I converted string 1 into an expression (Added = and enclosed the string with double quote).. As a result, all of the items in the Footer section are now placed together on the last page of the report.

I also remember one of the issue I encountered before where the Footer items where placed together on the first page and still have space at the bottom of the page, but then expression 6 is forced to display (alone) on the last page of my report.

I can't find any discussion related to this, I wish somebody could give me an idea why RS behaved like this.

Thanks in advance

View 1 Replies View Related

Fit An Intere Table In Same Page Without Page Breaks Excel Export In A Single Sheet.

Feb 14, 2008

Fit an intere table in same page without page break for save the excel export.

My table has a Group for order my dates.

I need to have the intere table in the same page, i don't care about blank space at the end of the page.

I can't use the page break beacuse i need an excel export in a unique sheet..
I have tested.. every page break..you'll have a different sheet in your excel export

I need something like this

page 1

Zone
1
2
3
4
5
6
7
7
8
9
..

page 2

Zone
1
2
3
4
5
6
7
7
8
9
..

but an unique sheet in the excel export

View 4 Replies View Related

Local - Including Page Header Forces Viewer To Expand To Page Size

Jul 17, 2007

Hello,
If I have a report that includes a page header, the report viewer will render the report at the full width, but if I hide the page header and show only the body it will use the absolute width of the report.

I have a 7" wide report, with .75" borders set on each side.

Interactive & Print size are set to 8.5x11
Changing these sizes has no effect on the behavior of the viewer, which appears to ignore them.


When I view this report in the local viewer the contents fill the window if there is no page header.
If I enable the page header then the report is drawn at 8.5" wide, leaving a _big_ white border on the right side.
Any comments or workarounds that anyone knows? I know the local viewer is not a standard configuration (at least it seems) but it is what we need to use.Thanks,//Andrew

View 1 Replies View Related

How To Access A .asp Page Or .aspx Page From A Store Procedure In Sql Server 2000

Sep 21, 2006

Hi, I wanted to know that can we access a webpagefrom a store procedure in sql server 2000 like we run a exe file from sql server. Bye.

View 1 Replies View Related

How Can I Print A Field That Is In The Dataset On Each Page And Show The Table Hearder On Each Page?

Apr 16, 2007

How can I print a field that is in the dataset on each page? I added a textbox in the Page Header and use =Fields!ProjectName.value in the value property. I got an error "Fields cannot used in page header and footer."



How can I have the table header shows on each page? Currently if the data goes to the second page, there is no table header.



Thanks.

DanYeung

View 8 Replies View Related

Removing The White Space In Between The Image And Page Border Of The Page Header

May 26, 2008

Hi Team,


When i view the Report from SSRS Report preview Tab it's working fine, But when i deploy that and try to view in the IE
I am seeing the Body background color in between the image and page border of the page footer how to solve that?

View 1 Replies View Related

Single Page Report In SSRS Is Printing With The Second Page Blank....URGENT

May 16, 2008



Hi All,
In my SSRS report. I have a report which has only one page. In preview it is showing as only 1 page but when I am printing the report. I am getting two printouts with the second page as a blank.. Please help me in printing the page that contains report. Intially I used a Page header, at that it used to print the blank page with a header only. Now as I removed the header it is printing the page without header i.e Blank Page.. So please help me in prinitng a single page that has the report. It is urgent,..

Thanks
dotnetdev1

View 5 Replies View Related

Reporting Services :: Tables Are Showing Up In Same Page When There Is No Data Even After Giving Page Break Option

May 7, 2015

I have a report with multiple tables. I need to show each tables in different pages. When there is no data for tables/tables , it is coming with the next table which has data. I have given "Add a page break after" option in the tablix but still the tables are coming together when no data available. How can I show it in different page?

View 2 Replies View Related

SQL Server 2012 :: Force Page Footer At Bottom Of The Page

Mar 12, 2015

I have a report with tablix. when tablix returns no rows Footer is coming all the way up . How to display the footer at the bottom of the page all time.

View 0 Replies View Related

Reporting Services :: Page Break In Middle Of Two Page Report

Nov 11, 2015

How do I add a hard page break in the middle of a two page report? I use Microsoft reports for windows.

View 5 Replies View Related

Page Header Taking Up Blank Space On 1st Page Even If Not Printing

Apr 15, 2008

In SRSS 2005 (SP2) my page header seems to take up the same amount of space on the
1st page it would take if it were to print; I have PRINT ON FIRST PAGE set to
false - the header doesn't print - it just leaves the same amount of space.
How do you get the report to ignore that. I do have a report header built
into the body of my report. I have tested this by increasing the size of my
page header and it does move the report up or down on the 1st page by that
amount.

View 8 Replies View Related

Blank Page When Printing/Exporting Prior To Every Report Page

Jan 23, 2008

I'm hoping that someone can shed some light on this for me... I'm using SSRS SP2 and I have a basic report using a single list object which, at the moment, should print only two pages based on the results of the underlying query. When previewing the report, it shows the two pages. But when the report is printed or exported, there is a blank page before each report page.

What I've done so far:
1) Verified the properties of the list object and made sure that 'Insert a page break before this list' is not checked

2) Ensured that there are no hidden objects that could be causing this behavior
3) Ensured that the report size + margins are within the boudaries of an standard 8.5x11 paper size


Any suggestions on something that would solve this issue?

Sam

View 6 Replies View Related

Do Somebody Know How Long (in Chars) Script(command) Can Be Solved By SQL Command?

Aug 30, 2004

Do somebody know how long (in chars) script(command) can be solved by SQL Command?
Thanks

View 1 Replies View Related

What Command Is Used To Get Back The Privileges Offered By The GRANT Command?

Mar 10, 2007

reply.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved