Static Data: DB Connection Not Required.

Jan 22, 2007

I have a report with this data query:

select ID1 = 6, ID2 = 15, ID3 = 3, ID4 = 3

The data is evidently static here, and hence database access is not required.

Is there a way to omit the connection string in the Datasource, or have a disconnected Datasource that does not connect to any database?

Currently I am setting the connection string arbitrarily, but it would be ideal to omit it altogether.

TIA,

ana

View 1 Replies


ADVERTISEMENT

Dynamic OLE DB Connection String With Static User ID And Password

Apr 30, 2008

I'm trying to setup a dynamic ole db connection using the SA user ID, it has to be dynamic because the server name will change and it has to be SA because we're pulling information from system databases that some users don't have access to.

If I setup a regular static connection using SA credentials it works like a charm of course. When I create an expression to use the User:erver variable it doesn't work, it throws an error message saying that "The login failed for user sa" among other things, I'm thiking that the sa's password is not being saved.

Where exactly do I place a password for dynamic connections using sql server users? On the connection string? On the password property of the source? Any ideas?

View 1 Replies View Related

Msg 6573 - Method In Assembly Is Not Static - How Do I Make It Static ?

Feb 22, 2006

I'm using Delphi 2006 to create a DLL which will be integrated into SQL 2005. It's been a long road and I've made a lot of headway, however I am currently having the following problem creating the stored procedure:

My dll name is 'Crystal_Reports_Test_01'
In the DLL, my class is named 'Class01'.
In the DLL, my procedure is named 'TestMe'

I've managed to integrate the DLL into SQL using the following statement:

CREATE ASSEMBLY TEST_ERIC_01
AUTHORIZATION dbo
FROM 'c:mssqlassembliescrystalreports.dll'
WITH PERMISSION_SET = UNSAFE

I am attempting to create the stored procedure which points to the 'TestMe' method inside of the DLL. FYI: 'CrystalReports' is the namespace above my class that I had to add in order to get it to locate the class. The following code is used to create the stored procedure:

create procedure dbo.Crystal_Reports_Test_01(
@Parm1 nvarchar(255)
)
as external name TEST_ERIC_01.[CrystalReports.Class01].TestMe

But I get the following error:

Msg 6573, Level 16, State 1, Procedure Crystal_Reports_Test_01, Line 1Method, property or field 'TestMe' of class 'CrystalReports.Class01' in assembly 'CrystalReports' is not static.

I'm not sure what this means exactly. I think it means the method (the procedure) is not using Static method binding but should be. I have no idea what this really means or how to accomplish this in the DLL - or if I'm even going about this in the right way.

Any help would be appreciated ! I'll post the Delphi code (DLL) below.

Thanks,

Eric Gooden

library CrystalReports;uses System.Reflection, System.Runtime.InteropServices;...................type Class01 = class public procedure TestMe([MarshalAs(UnmanagedType.LPWStr)] var sVarString: wideString); export; end;procedure Class01.TestMe([MarshalAs(UnmanagedType.LPWStr)] var sVarString: wideString); export;begin sVarString:= 'Lets change the value and see if the stored proc. gets the change.';end;end.

View 4 Replies View Related

Power Pivot :: Merging Static Excel Data With Dynamic Data?

Aug 19, 2015

I have some data in Excel - sheet1 which would be static.

Now I need to import data from SQL Server (using a query) and Union above static data with this SQL data and later I will have to create PowerPivot table in Sheet2.

Which is suitable option for me to import data from SQL to excel as I see "From SQL Server" option under "Data" and "Power Query" tab as well.

How to merge above SQL data with existing static data?

(SQL Server 2012)

View 6 Replies View Related

Update Query Containg Static Data And Data From Another Table.

Sep 28, 2006

Hi,First post so apologies if this sounds a bit confusing!!I'm trying to run the following update. On a weekly basis i want toinsert all the active users ids from a users table into a timesheetstable along with the last day of the week and a submitted flag set to0. I plan then on creating a schduled job so the script runs weekly.The 3 queries i plan to use are below.Insert statement:INSERT INTO TBL_TIMESHEETS (TBL_TIMESHEETS.USER_ID,TBL_TIMESHEETS.WEEK_ENDING, TBL_TIMESHEETS.IS_SUBMITTED)VALUES ('user ids', 'week end date', '0')Get User Ids:SELECT TBL_USERS.USER_ID from TBL_USERS where TBL_USERS.IS_ACTIVE = '1'Get last date of the weekSELECT DATEADD(wk, DATEDIFF(wk,0,getdate()), 6)I'm having trouble combing them as i'm pretty new to this. Is the bestapproach to use a cursor?If you need anymore info let me know. Thanks in advance.

View 4 Replies View Related

RAM Required Per SQL Connection

May 2, 2001

How much RAM is necessary for concurrent SQL connections? My server has 2 Xeon processors, 1GB RAM, a 10GB database size on a TCP/IP box. CPU utilization can run 80-90% and pages/sec can sometimes jump up to 40, especially is the users are running reports from the SQL database. I've been told by some people that I have enough RAM to support the 130 SQL user connections. Others I've been told that I need at least 40MB RAM per user (which means that I'm about 4GB short of RAM). Based on previous entries, I obviously need more, but how much more is the question.

View 3 Replies View Related

Fundamental Help Required With SQL Connection

Jul 20, 2005

I am writing SQL data apps using VB.NET 2003, MSDE is being used as theserver.When I create and instance of the server, it has a the formatmachinename/instancenameThis is fine for the developement machine but how does my code connect tothe server when it is on another machine ? When an instance of MSDE is runon the target, it will produce...anotherPCname/instancenameThanks for any help

View 11 Replies View Related

Static Data In Table's Details Section?

Mar 21, 2008

Hi,

Can anyone tell me is it possible to put static data (a string) inside details section of a table?
I've tried to find some more pieces of information in the Report Definition Language Specification, but to no avail.

When I put some strings as a detail's cells values they are displayed in the preview window in VS.
But thay are invisible when I open my report using ReportViewer in my app.
So does it means that the only accepted value of a cell within the details section of a table is a name of the field from DataSet (something like =Fields!FieldName.Value) ?

Regards,

Stan

View 1 Replies View Related

Insert Static Value To Every Row In Data Flow Task

Sep 28, 2007

I have created an SSIS Package that takes data in an excel file and writes it to an Oracle Database. The excel file has 5 columns, but the database tabls has many additional columns. I would like to default some of these other columns for this job. For instance, I want to set the created and updated times to the time when the job ran, and set some other fields to values that will be consistent for every row in the job.

How do I accomplish this?

View 4 Replies View Related

Web Synchronization - Is Direct Connection To The Publisher Required ?

Dec 6, 2006

Hi,

I've been trying to setup a merge replication environment for a SQL Server 2005 publisher. This connection can only happen via the internet and Port 1433 cannot be opened. The replication has to be enabled only via the intenet, which is why i figured web synchronization would be a feasible choice. I've since enabled the publisher and also set up the web synchronization on a SSL based virtual directory.

However, while setting up a subscription on the client machine (using Management Studio), the first step in the wizard is to connect to the publisher.

Essentially, i need to configure a subscriber to synchronize with a publisher using web synchronization over the internet, with no direct connection to the publisher.

I've followed all the steps specified in a multitude of web sites and "Books Online", however, i come back to the same problem at the subscriber.

Is there a way to get around this or am i not doing something correct?

Ashish

View 1 Replies View Related

Connection String Required To Connect Asp.net And Sql Server 7.0

Nov 15, 2007



Hi
I am new to .net and sql server....i have just installed VS 2005 and sql server7.0...
I am doing my coding in vb.net......so i wanted to know the connection of the datagrid to the db in my sql server 7.0.
Can some one pls help me with this urgently.

View 6 Replies View Related

BULK INSERT, Setting Static Data Using The Format File

Mar 2, 2004

Hello dbforums,

I are using a BULK INSERT to insert the data from a ascii file to a sql table. The table has a ProductInstanceId column that exists in the tables but does not exist in the ascii DICast data. I am setting the ProductInstanceId to a Guid that will be used for Metrics. I would like to create the Guid in C++ and then set it somehow during the BULK INSERT DICastRaw1hr and DICastRaw6hr. I am calling the BULK INSERT from C++/ADO. I do not see how you can set a static data in the BULK INSERT for a column that exists in the table but does not the source data ... seems there should be a way to do this with the format file?

The other way to do this is with a TRIGGER. I have the TRIGGER below. Prior to the calling the BULK INSERT using ADO I will use ADO to ALTER the TRIGGER with the new Guid. When the BULK INSERT runs the ProductInstanceId will be populated with the new Guid.

ALTER TRIGGER DICastRaw1hrInsertGuid
ON Alphanumericdata.dbo.DICastRaw1hr
FOR INSERT AS UPDATE dbo.DICastRaw1hr SET ProductInstanceId = '4f9a44eb-092b-445b-a224-cc7cdd207092'
WHERE modelrundatetime = (select max(modelrundatetime) from Alphanumericdata.dbo.DICastraw1hr(NOLOCK))

More Questions:

- The Trigger is slow. The Bulk Insert without the Trigger runs in about 10 sec ... with the Trigger in about 40 sec. I tried to use the sql code below in the TRigger but it was only doing the UPDATE on the last row. The TRIGGER must run after the BULK INSERT is complete. Now I am using the select (bad). Any comments ...

ALTER TRIGGER DICastRaw1hrInsertDate
ON Alphanumericdata.dbo.DICastRaw1hr
FOR INSERT
AS
DECLARE @ID as integer
SELECT @ID = i.recordid from inserted i
UPDATE dbo.DICastRaw1hr SET ProductInstanceId = '4f9a44eb-092b-445b-a224-cc7cdd207092'
WHERE recordid = @ID

- I understand that I could set the Guid in the Default Value part of the table definition using the NEWID() function. I need the Guid to be the same for all the rows that are inserted during the BULK INSERT (all have the same modelrundatetime) ... how would I do this?

Thanks,
Chris

View 6 Replies View Related

Adding Static Column Of Data From Properties File To DB Import

Sep 4, 2007

Hey all-

I put togehter a package that opens a flat file, parses the data based on the semi-colon delimeter, and imports the rows into a database table. Thats the fun easy part.

What I cant figure out is how to add a variable that will hold a constant ID value that will be persisted with the same value to all rows inserted to the DB. Making the problem harder, I would like that this value be defined in a properties file or database table of some sort so that I can do a lookup based on the file name / location to find out what value should be used.

Any suggestions? I hope my explanation makes at least some sense - but basically I want to do a look up in a configuration of some sort, pull out a single value, and add it to a data import.

let the fun begin!!

View 4 Replies View Related

Transact SQL :: STATIC Defines A Cursor That Makes Temporary Copy Of Data To Be Used By Cursor

Aug 12, 2015

In MSDN file I read about static cursor

STATIC
Defines a cursor that makes a temporary copy of the data to be used by the cursor. All requests to the cursor are answered from this temporary table in
tempdb; therefore, modifications made to base tables are not reflected in the data returned by fetches made to this cursor, and this cursor does not allow modifications

It say's that modifications is not allowed in the static cursor. I have a  questions regarding that

Static Cursor
declare ll cursor global static
            for select  name, salary from ag
  open ll
             fetch from ll
 
              while @@FETCH_STATUS=0
               fetch from ll
                update ag set salary=200 where 1=1
 
   close ll
deallocate ll

In "AG" table, "SALARY" was 100 for all the entries. When I run the Cursor, it showed the salary value as "100" correctly.After the cursor was closed, I run the query select * from AG.But the result had updated to salary 200 as given in the cursor. file says  modifications is not allowed in the static cursor.But I am able to update the data using static cursor.

View 3 Replies View Related

Sample Data Required

Feb 13, 2007

Hello.

Though this is not directly a SQL related question but I could not think of some other forum to post this request. <y apologies if I should have posted elsewhere...


I need some sample data for a departmental store (like WalMart of KMart) which sell a wide variety of things and probably everything under the sun :)

I need data in such a manner that we have 4-5 levels of data hierarchy. For example we can have a data hierarchy like follows:

Classification
Category
Sub Category
Product Group
Item


The above is just an example but I hope that most of you already know what I neeed. An example of data based on the following hierarchy can be as follows (shown in a tabular manner)


Classification | Category | Sub Category | Product Group | Item
---------------------------------------------------------------
Household Items| Electronics| Entertainment| Audio| SONY Room entertainment box, 2 speakers 300 W each, ....
Household Items| Electronics| Entertainment| Audio| Phillips Boom Box, ...specifications....
Household Items| Electronics| Entertainment| Video| SAMSUNG DVD Player model SG-17X5 ...
Household Items| Electronics| Entertainment| T.V | SONG TRINTORN 51" .....
...
...

Groceries | Drinks | Colas| Coke | COke 12-Pack Cans ....
Groceries | Drinks | Colas| Coke | COke 2.25 Litre Jumbo Pack..
Groceries | Drinks | Colas| PEPSI| PEPSI 2.25 Litre Jumbo Pack..
.....
...

Toys | Girls | Dolls| Barbie | Barbie princees model A21 ..
...
..



I hope the above provides you with a clear understanding of my requirement.

I'll be extremely grateful for your help.

Thanks & Regards.

View 4 Replies View Related

Sample Data Required

Feb 13, 2007

Sample data required


Hello.

Though this is not directly a SQL related question but I could not think of some other forum to post this request. <y

apologies if I should have posted elsewhere...


I need some sample data for a departmental store (like WalMart of KMart) which sell a wide variety of things and probably

everything under the sun :)

I need data in such a manner that we have 4-5 levels of data hierarchy. For example we can have a data hierarchy like

follows:

Classification
Category
Sub Category
Product Group
Item


The above is just an example but I hope that most of you already know what I neeed. An example of data based on the following

hierarchy can be as follows (shown in a tabular manner)


Classification | Category | Sub Category | Product Group | Item
---------------------------------------------------------------
Household Items| Electronics| Entertainment| Audio| SONY Room entertainment box, 2 speakers 300 W each, ....
Household Items| Electronics| Entertainment| Audio| Phillips Boom Box, ...specifications....
Household Items| Electronics| Entertainment| Video| SAMSUNG DVD Player model SG-17X5 ...
Household Items| Electronics| Entertainment| T.V | SONG TRINTORN 51" .....
...
...

Groceries | Drinks | Colas| Coke | COke 12-Pack Cans ....
Groceries | Drinks | Colas| Coke | COke 2.25 Litre Jumbo Pack..
Groceries | Drinks | Colas| PEPSI| PEPSI 2.25 Litre Jumbo Pack..
.....
...

Toys | Girls | Dolls| Barbie | Barbie princees model A21 ..
...
..



I hope the above provides you with a clear understanding of my requirement.

I'll be extremely grateful for your help.

Thanks & Regards.

View 3 Replies View Related

Sample Data Required

Feb 13, 2007

Hello.

Though this is not directly a SQL related question but I could not think of some other forum to post this request. <y

apologies if I should have posted elsewhere...


I need some sample data for a departmental store (like WalMart of KMart) which sell a wide variety of things and probably

everything under the sun :)

I need data in such a manner that we have 4-5 levels of data hierarchy. For example we can have a data hierarchy like

follows:

Classification
Category
Sub Category
Product Group
Item


The above is just an example but I hope that most of you already know what I neeed. An example of data based on the following

hierarchy can be as follows (shown in a tabular manner)


Classification | Category | Sub Category | Product Group | Item
---------------------------------------------------------------
Household Items| Electronics| Entertainment| Audio| SONY Room entertainment box, 2 speakers 300 W each, ....
Household Items| Electronics| Entertainment| Audio| Phillips Boom Box, ...specifications....
Household Items| Electronics| Entertainment| Video| SAMSUNG DVD Player model SG-17X5 ...
Household Items| Electronics| Entertainment| T.V | SONG TRINTORN 51" .....
...
...

Groceries | Drinks | Colas| Coke | COke 12-Pack Cans ....
Groceries | Drinks | Colas| Coke | COke 2.25 Litre Jumbo Pack..
Groceries | Drinks | Colas| PEPSI| PEPSI 2.25 Litre Jumbo Pack..
.....
...

Toys | Girls | Dolls| Barbie | Barbie princees model A21 ..
...
..



I hope the above provides you with a clear understanding of my requirement.

I'll be extremely grateful for your help.

Thanks & Regards.


Thanks & Regards.

-J

View 4 Replies View Related

Data Required In Column

Jun 9, 2007

Dear all
i am newbie to this forum as well as learning SQL so don't have much knowledge.
i want one query which will transpose data in column
i have 3 fileds
Scrip--COC--DAte
A--25--01/06/07
B--34--01/06/07
C--65--01/06/07
A--65--02/06/07
B--98--02/06/07
C--37--02/06/07


now i want a query which shows data in this way

SCRIP--01/06/07--02/06/07--03/06/07
A--25--65--....
B--34--98--....
C--65--37--....

now this date column will be only 5 i.e. 1 which user puts + 4 preceding dates from user date (ignoring sequence means if user put 10/06/07 then next will be 09/06/07 but if this wont exists then take 08/06/07 & so on till 4 dates)
the data will be unique means no scrip repeats more than once in a day

pl reply soon

View 1 Replies View Related

Required Microsoft Sql Server 2005 Express Server Roles For JDBC Connection

Mar 28, 2007

Hi!

I have developed a database in MS SQL Server 2005 Express, to which I would require only bulkadmin server role from an external java application, because I only need to update rows, insert values or use select queries in the database.

The problem is that, using either the Microsoft JDBC Driver 1.1 or the Java JDBC ODBC Driver and the Windows XP Data Base (ODBC) configurations, I need a user with sysadmin server role inside Sql Server, otherwise JDBC won't connect to the database using the selected user. Even if I leave the sql login with setupadmin or any server role lower than sysadmin, the connection is refused.

Is there no way to connect using JDBC to MS Sql Server 2005 other than granting the connected user sysadmin rights? My code looks as follows:




Code Snippet

String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
String url = "jdbc:sqlserver://FIREBLADE\SQLEXPRESS";
String user = "username";
String password = "password$$";
Connection conn;

Class.forName(driver);
conn = DriverManager.getConnection(url,user,password);
if (conn != null)
System.out.println("SQL Server Connection established ...");

I have heard that Java JDBC connections to Microsoft require high-level access.

Any informed answer is more than welcome. Thanks for reading my post!

View 1 Replies View Related

Required Data In A Row-SQL Server 2000

May 6, 2008


Hello,
I am trying to get results in one row from the following function but all records does not come from the following function.
I have 9 records of the same empid but results not showing all records. Can anybody help me to get all records with the fields and table which I am using.
My table is beneficiary and fields are empid int, fname char(40), benefittype char(4) and benefitpercentage .
Following function is working but problem is not getting all results in one row, as described below.

CREATE FUNCTION dbo.GetBenefString5
(
@Empid INT
)
RETURNS VARCHAR(8000)
AS
BEGIN
DECLARE @ret VARCHAR(8000)
SELECT @ret = ''
SELECT
@ret = @ret + CASE WHEN LEN(@ret) > 0 THEN ',' ELSE '' END + FName + ' ' + Benefittype + ' ' + BenefitPercentage
From Beneficiary

Where Empid = @Empid
RETURN @ret
END

SELECT
Empid,
dbo.GetBenefString5(Empid)
FROM pf25eaton_work.dbo.eaton_chr_benef_05052008
where EmployeeNumber='4500498'
GROUP BY Empid


Result from the above function query:
Empid ----------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1773 CHARLENE OLIF 33 ,CHARLENE EADD 33 ,CHARLENE ELIF 33 ,TIMOTHY EADD 33 ,TIMOTHY

(


Records are in the table: (But I have many records like that so definitely I will need counter/function etc to get these data.
FName Benefittype BenefitPercentage
---------------------------------------- ----------- -----------------
CHARLENE OLIF 33
CHARLENE EADD 33
CHARLENE ELIF 33
TIMOTHY EADD 33
TIMOTHY ELIF 33
BRADLEY ELIF 33
TIMOTHY OLIF 33
BRADLEY OLIF 33
BRADLEY EADD 33

Desired Result in one row:

Charlene OLIF 33, Charlene EADD 33, Charlene ELIF 33, TIMOTHY OLIF 33, TIMOTHY EADD 33, TIMOTHY ELIF 33, BRADLEY OLIF 33, BRADLEY EADD 33, BRADLEY ELIF 33

View 1 Replies View Related

What New Features Of .NET 2.0 Required In A Data Access Layer

Jan 10, 2008

Hi Experts ! I want to use maximum feature of SQL
Server 2005 and ASP.Net 2.0  in making Data Access LayerSuggestions will be welcomed .Thank you
RegardsKAMRAN

View 3 Replies View Related

Data Copy Error . Help Required . Urgent Please !

Jun 4, 2002

Hi Friends ,

When i try to copy one table , say for e.g table x from SQL 6.5 to SQL 7.0 it gives me an error that -

'Insert Error , column 46 ( 'Coloumn_name ',DBTYPE_DBTIMESTAMP), Status 6 :
Data overflow .
Invalid character value for cast specification .'

This column on the source server ( SQL 6.5 ) has datatype 'datetime ' with value 8 and is NULL .

Although there are other columns in this table with datatype as 'datetime' as 8 and NULL , they have been copied successfully to the destination table .Only this specific column is giving an error while copying data .

I am using import export wizard to copy data between servers .
Since i have no experience with this , would like to have a solution from you to this problem. It will be great help for me .

Thank you very much ,
Alisha .

View 1 Replies View Related

Change Collation- Migration Of Data Required

Jul 20, 2005

Hi,If I have a database with collation Sequence X and I change thecollation sequence of database to Collation Sequence Y , do I have tomigrate the data of tables with collation Sequence X to collationSequence Y or SQl server takes care of migrating the data internally.Thanks in advance.-Kalyan

View 1 Replies View Related

Help Required For Approach To Load Data Into Tables

Sep 27, 2007

Hi , I am loading the Data into the Tables with the constraints on and redirecting the error rows into a seperate table is there a way to capture the error rows from a execute sql task by directly loading data without constraints and later adding them with the execute sql task and redirecting them to error table as this approach would make the loads quicker. the approach now that i am using is on a row by row basis ..... and if i drop constraints and load data and then add constraints will this deposit the same error rows as in case of the current approach please send me ur suggestions

View 3 Replies View Related

Excel Integration And Data Cleansing Required

Mar 29, 2008



Hi all

I have two data sources - an excel spreadsheet and one access database of Customer details, (quite small in size) and I have to use SQL Server 2005 to Integrate the data and cleanse the data so that I could (in theory) import it into a CRM system (though I won't actually be importing it) as this is for coursework only.

Is there a simple steps to do this is SQL server and guides that I can follow that are relevent? As there are lots of tutorials and I haven't a clue where to start.

many thanks


little_tortilla

View 4 Replies View Related

Help Required In Import Data Into Sql 2005 From Excel 4.0

Sep 20, 2006

Hi
I have to import data from a number of excel files to corresponding tables in SQL 2005. The excel files are created using excel 4.0. I have created an excel connection manager and provided it with the path of the excel sheet.Next i have added an excel source from the toolbox to the dataflow. I have set the connection manger, data access mode, and the name of the excel sheet (the wizard detects the sheet correctly) in the dialog window i get when i double click the excel source. Every thing goes fine till here. Now when i select the 'columns' in this dialog window or the preview button, i get this error
TITLE: Microsoft Visual Studio------------------------------Error at Data Flow Task [Excel Source [1]]: An OLE DB error has occurred. Error code: 0x80004005.Error at Data Flow Task [Excel Source [1]]: Opening a rowset for "test4$" failed. Check that the object exists in the database.------------------------------ADDITIONAL INFORMATION:Exception from HRESULT: 0xC02020E8 (Microsoft.SqlServer.DTSPipelineWrap)------------------------------
Any ideas about why is this happening???
Umer

View 1 Replies View Related

System.Data.OleDb.OleDbException: No Value Given For One Or More Required Parameters.

Jan 23, 2007

Can someone help me with this error, so the page can show the rocords, its works on my PC but not at my host. 
I get this error:
Exception Details: System.Data.OleDb.OleDbException: No value given for one or more required parameters.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:



[OleDbException (0x80040e10): No value given for one or more required parameters.]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +267
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +192
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +48
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +106
System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) +111
System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +4
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +141
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

 
My code is:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="CMS_Default.aspx.vb" Inherits="cmssystem_CMS_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="CM_form" runat="server">
<div>
&nbsp;
<asp:GridView ID="GridView1" runat="server" DataSourceID="CMSqlDataSource">
</asp:GridView>
<asp:SqlDataSource ID="CMSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:CMConnectionString %>"
ProviderName="<%$ ConnectionStrings:CMConnectionString.ProviderName %>" SelectCommand="SELECT [SiteMainID], [SiteMainIdentity], [SiteMainText] FROM [MainSiteText] ORDER BY [SiteMainID]">
</asp:SqlDataSource>
</div>
</form>
</body>
</html>

View 7 Replies View Related

Export Data From Views To An Excel File . Help Required .

Apr 9, 2002

Hello everybody..

I have to copy data from a view of a database to an Excel file .
Is there any way of doing it ? Is there any way to import the data from the views to an Excel format ? We have SQL Server 7.0 .

Any information will be of great help to me .

Thank you very much.

Deepa.

View 2 Replies View Related

SQL Server 2008 :: Incremental Load Only Required Data?

Apr 30, 2015

I have a table in Server A and it has 5 columns. One is Address & ID, CreateDatetime,..

I need to transfer data from this table from Server A to server B for a report pupose. The Address column in this table has some places two address in the table. I am giving ex below

Address
Houston, Dallas
Redmond
Sacramento
New Jersey, New York

I want to avoid the rows where address are two Houston, Dallas & New Jersey, NewYork to the destination table in server B and need to do incremental loads.

how to proceed with this?

The version we are using is Sql Server standard edition 2008r2

View 2 Replies View Related

T-SQL (SS2K8) :: Select Query To Pull Required Data From 3 Tables

Mar 19, 2014

I have three tables EmpIDs,EmpRoles and LatestRoles. I need to write a select Query to get roles of all employees present in EmpIDs table by referring EmpRoles and LatestRoles.

Where I stuck : The condition is first look into table EmpRoles and if it has more than one entry for a particular Employee ID than only need to get the Role from LatestRoles other wise consider the role from EmpRoles .

Example:

Create Table #EmpIDs (
EmplID int
)
Create Table #EmpRoles (
EMPID int,

[Code] ....

Employee ID 2 is having two roles defined in EmpRoles so for EmpID 2 need to fetch Role from LatestRoles table and for remaining ID's need to fetch from EmpRoles .

My Final Output of select query should be like below.

EmpID Role
1 Role1
2 Role2
3 Role1

View 5 Replies View Related

Data Retrieval From Online Database - Paid Consultant Required

Jul 20, 2005

Hi,I wonder if anyone can help with the following on a fee paying basisfor the the design or development of some type of script or utility orpiece of code to do the following work.I wish to retrieve some data from an online database that is in thepublic domain. The online database has a search facility that matchesthe entry (name) in a search box then returns a screen stating that amatch has been found or not found.If a match is found there is a button to click that proceeds to thescreen containing the data which is simply two names. It is these twonames that I wish to retrieve and store them in something like a textfile where they are associated with the original entry (name) used inthe search box.I have a list of the entries for the search box that can be suppliedin sample format for testing as a columnar text file or commadelimited file or a spreadsheet.. I would need the procedure toprocess the list of search entries, retrieve the data then move on tothe next one in the list. Obviously, if a match was not found then theprocess would need to move on the the next entry in the list withperhaps a message saying "No Match" until the entire list wasprocessed.The PC I hope to run the process on is a Windows XP machine and if Ineed to purchase any particular software that is necessary for the jobthen I am quite willing to do so. Also, as I pointed out above I wouldpay for the work to be done.I hope that I have explained the above OK and that I have posted it tothe correct newsgroup(s). If it is not in the correct newsgroup Iwould be grateful if anyone could point me in the right direction.RegardsDave Gibson

View 1 Replies View Related

SQL Server 2008 :: Write A Cursor To Fetch Required Data From Table?

Oct 21, 2015

I have been trying to write a cursor to fetch required data from table but somehow its running forever and inserting duplicate records.

I have a temp table named getInvoice where I have five important columns

1. invoice number
2.group
3.invoice status
4. Invoice Expiration date
5. Creation date time

and some other columns.One invoice number can belong to one or more group and there can be one or more records for a particular invoice number and group.

An example is below :

InvoiceNumber Group InvoiceStatus InvoiceExpirationDate CreationDateTime

579312 01 3 NULL 2003-03-24 00:00:00
579312 01 2 2015-12-14 00:00:00 2005-12-24 00:00:00
579312 02 2 2003-12-21 00:00:00 2005-10-12 00:00:00
321244 01 2 2015-12-21 00:00:00 2005-10-12 00:00:00
321244 01 3 2010-12-21 00:00:00 2010-12-21 00:00:00

My query condition is complex and that is why Im facing problem retrieving the output.I need a cursor for getting distinct invoice number from the table and for each invoice number I need to get the latest record for each invoice number and suffix combination based on creationdateand time column and if that record has invoice status of 2 and also the invoice expiration date can be either null or greater than today's date, then I need to get that record and put it in a temp table.

The query I wrote is below

declare myData cursor for
select distinct invoiceNumber from #getInvoice
declare @invoiceNumber varchar(30)
open myData
fetch next from myData into @invoiceNumber
while @@FETCH_STATUS = 0

[Code] .....

This query runs forever and doesn't stop.

View 6 Replies View Related

Master Data Services :: Windows 8 - Required SVC Handler Mappings Are Not Installed In IIS

Oct 9, 2012

I am getting the error "The required .svc handler mappings are not installed in IIS" in the Master Data Services Configuration Manager. I am running the configuration tool as administrator on a domain joined machine using a domain user account (which is also a member of the local Administrators group).

My configuration is as follows:
Windows 8
SQL Server 2012 RTM + CU 2 (build 11.0.2325).

All required prerequisites should be installed in IIS.I have reviewed this issue: URL...

View 9 Replies View Related







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