Help Passing UserName To The WHEREclause Using The Configure DataSource Wizzard In Visual Studio UI
May 31, 2007
(I asked this question in another forum, but think it may be more of asql question)
Hi.
I bet this is a 101 question, but i'd appreciate any help!
I am in the 'where...' section of the configure data source wizzard .(Visual Studio 2005)
Column:(From my table) I select 'UserName' from drop-down
Operator: I select '=' from drop-down
BUT how do I get the UserName (The user is signed into the app) to pass to the where clause?
Is it from the Form? Profile? Session?
Ive tried Form.Page.User.Identity.Name.ToString;
Form.NamingContainer.Page.User.Identity.Name.ToString;
Profile.UserName;
NOTHING works. IF I set the default value to a user name (eg joe_user) it retrieves fine, but I need it to retrieve for the currently signed in user.
THANKS In advance....
Dan
View 7 Replies
ADVERTISEMENT
Feb 5, 2007
Hi
I am new to all SQL Related. I am trying to create a datasource to our old database we used in the company to write reports on the data. when I create a new data source and enter all required info, when testing the connection, i get a reply that I do not have the necessary permissions to use this object, although my account is specified as an administrator? can somebody please explain this to me.
View 1 Replies
View Related
Feb 5, 2007
Hi
I am new to all SQL Related. I am trying to create a datasource to our old database we used in the company to write reports on the data. when I create a new data source and enter all required info, when testing the connection, i get a reply that I do not have the necessary permissions to use this object, although my account is specified as an administrator? can somebody please explain this to me.
View 5 Replies
View Related
Apr 29, 2008
How do you define a JDBC datasource in Microsoft Visual Studio? I am using Microsoft Visual Studio to develop reports for SSRS and would like to connect to DB2 via JDBC. Attempting to use the SQL JDBC install as a example, I don't see how to define the SQL JDBC driver to Visual Studio. The SQL JDBC runtime install is very clear, but I don't see how to use this type of datasource in Visual Studio.
Thanks!
View 1 Replies
View Related
Jul 5, 2006
I saw a powerpoint slide with a Configure Sync Settings dialog in visual studio. I am unable to find this dialog in visual studio team system. Can someone tell me how to get to this Configure sync settings dialog?
View 4 Replies
View Related
Feb 19, 2008
"Short" Story Version:
I have a VS 2005 Web Appplication solution that uses SQL Server Reporting Services 2005. One of the projects is a Report Server Project. In this project I have an RDL file that has:
1.)a non-shared XML DataSource (no credentials),
2.)a DataSet with a Command Type of Text and a Query String that is as follows:
<Query>
<XmlData>
<Root>
<LOAD LOAD_ID_PREFIX="" LOAD_ID="" TRUCK="" DIAGRAM=""/>
</Root>
</XmlData>
</Query>
3.)a field that comes from the Database that is of VarBinary(Max) that is a JPEG Image
What happens is, is that by doing #2 above, at design time I can create tables and hook into my datasets and get the report all designed out the way I want. Then at runtime, I have a Stored Procedure that uses the "FOR XML AUTO" option so that I can represent my results from the database in an XML fashion which will allow me to replace the XML Schema in between the Root tags above (in #2) with my actual data (which still has the same schema). I then save the modified RDL to a database table field and move on to happily ever after......in this case, not. In this case, since an VarBinary is involved, unless I want to get a pointer back for the Diagram Column, I have to use the "FOR XML AUTO, BINARY BASE64" option. This returns an Encoded string to represent the Binary value that was in the Database....and this is the partial source of my angst....read on.
My approach that I described above worked flawlessly in all cases where an image wasn't involved. This report is the only report in the whole system I am working on that will have an image and it is the last one being done, so that's why I didn't run into this earlier.
I have tried all kinds of things at different levels, but the thing that I have tried that seemed to me to have the most potential was to use Embedded Code to take the Encoded ASCII Value and convert into something binary that the SSRS Reporting Engine likes (so my image will show), but I have been unsuccessful thus far. The error message I keep getting now from my Embedded Function is: "Invalid length for a Base-64 char array", which I have not been able to resolve thus far....and I do know that the Binary value in the database is good becuase I can see it in pages in my application otherwise.
This aside, is there anyone out there that knows how to take the value of a VarBinary(Max) field and insert it into the Text (XML) DataSet in the markup of an RDL file....and have it appear correctly when the report is rendered in something like the standard Report Viewer Control (or even when being previewed at design time inside of Visual Studio for that matter)?
Just to be clear, the root of my problem, as I see and understand it, is that I have a VarBinary value in a database that is being converted to a string (ASCII...I am presuming) due to how I am writing my stored procedure and then needs to go back to something else binary that the SSRS Engine will accept so that I can see my Image in the report when I render it.
I am wishful that someone out there understands my problem and has run into this and has a solution......but I am wishful of winning the lottery, too, and that hasn't happened yet...............
Thanks.
View 4 Replies
View Related
Mar 7, 2007
When creating a report using reporting Services with a cube as a datasource, visual studio 2005 hangs. I have applied SP1 to visual studio.net 2005 .
This is the query generated by query designer in reporting services. When I try to drag and drop another dimension to slice it by , visual studio hangs.
The fact table has just 10,000 records. Are the number of dimensions used to slice the cube too many? How do I optimize this query?
SELECT NON EMPTY { [Measures].[Avg MT Rate - Speech], [Measures].[Change in Avg MT Rate], [Measures].[Edited Lines Per 1000], [Measures].[Speech Utilization], [Measures].[Time Saved %], [Measures].[Speech Edited for Rev 1], [Measures].[Change in Account Productivity], [Measures].[Hours Saved], [Measures].[Lines Per 1000], [Measures].[Average MT Rate - Total Production], [Measures].[Typed Lines], [Measures].[Productivity Time in hours - Edited Docs],[Measures].[Productivity Time in Hours - Typed Docs],[Measures].[Productivity Time in Hours]} ON COLUMNS, NON EMPTY { ([Dim Customer].[Customer Name].[Customer Name].ALLMEMBERS * [Dim Customer].[Dictator Site Name].[Dictator Site Name].ALLMEMBERS * [Dim Date].[The Month].[The Month].ALLMEMBERS * [Dim Date].[The Year].[The Year].ALLMEMBERS * [Dim MT].[Creator Last Name].[Creator Last Name].ALLMEMBERS * [Dim MT].[Creator First Name].[Creator First Name].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( STRTOMEMBER(@FromDimDateTheYear, CONSTRAINED) : STRTOMEMBER(@ToDimDateTheYear, CONSTRAINED) ) ON COLUMNS FROM ( SELECT ( STRTOMEMBER(@FromDimDateTheMonth, CONSTRAINED) : STRTOMEMBER(@ToDimDateTheMonth, CONSTRAINED) ) ON COLUMNS FROM [ETL DW])) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
View 1 Replies
View Related
Mar 27, 2006
Hi all,Is it possible to pass command line arguments to a package when running it from within VS? I want to set the value of a variable via the commandline, and found that you can to this in DtExec with the "/set Package.Variables[...].Value;..." syntax. According to the docs, you should be able to pass the same argument via the 'CmdLineArguments' property in the 'Properties' dialog of an SSIS project in VS (CmdLineArguments. Run the package with the specified command-line arguments. For information about command-line arguments, see dtexec Utility), but unfortunately, this doesn't seem to work (even though the exact same argument does work when entered in DtExec)
Any help would be greatly appreciated :-)
Steven
View 2 Replies
View Related
Jan 19, 2006
I ask because I'm still looking for the source of interface problems I have in using the SSIS designer.
View 4 Replies
View Related
Oct 10, 2007
I'm using the asp.net login controls and am storing the user data in the sql table that get's automaticaly built by visual studio. I display records based on who is logged in. Currently i use a Session parameter in my datasource for the user name and store the username in a session variable on the page load event, Session["UserName"]= User.Identity.Name.
Is there a way i can use a Profile parameter in my data source and skip setting session variable all together? I tried putting Name and UserName and User.Identity.Name in the Profile property but nothing seems to work. Thanks for any help.
View 6 Replies
View Related
Jul 8, 2007
A beginner's question I'm sure. When visitors have logged into my site, how do I then use their UserName as a parameter in an SQL WHERE clause so that I can pull up their detailed information. I'm using VB if additional code is required.
Thanks in advance.
View 2 Replies
View Related
May 16, 2008
I've created a SSIS package with a DataReaderDestination and a SSRS report that points to it.
I referenced these links during development and I have everything working as expected locally. **I changed the config files as stated on both my local machine and our server. My config matches the example exactly.
http://msdn.microsoft.com/en-us/library/ms345250.aspx
http://msdn.microsoft.com/en-us/library/ms159215.aspx
When I attempt to deploy my report project to the server I get this error message:
"An attempt has been made to use a data extension 'SSIS' that is not registered for this report server."
In the report manager data source properties page it reads:
"The data processing extension used for this report is not available. It has either been uninstalled, or it is not configured correctly."
In SQL Server Management Studio data source properties page SSIS is not a data source type option.
I've tried restarting both the Reporting Services and Integration Services on the server to no avail.
Any suggests? My problem is I can't get the SSIS to be recognized source on the server.
View 1 Replies
View Related
Oct 11, 2006
I have successfully Create a Site, Inserting Updating and
Deleting information in my DB all with Stored Procedures, But I need the
ability to pass their username into my Stored Procedures. How and where do I
code this in my ASPX file?
My SP would be something like this
Create procedure test
@UserName
varchar(50)
As
Select *
From table
Where username
= @username
All of the
data is tied to the user in one way or another but I do not know what code to
put in my page?
View 2 Replies
View Related
Mar 23, 2008
I can select the tables and fields, but when I click on Advanced the Check Box to Create the Commands is not available. they are dimmed out.
Why is this happening, is it a setting that I have missed. Any help is appreciated.
View 1 Replies
View Related
Mar 17, 2007
I have a database in my "App_Data" folder of my visual studio project. I can view it fine in Visual Studio's built-in tools for managing a database attached to a solution. However i recently started playing around with the SQL Server Management Studio Express program. When i attach my database to Management Studio, and try to run my program it crashes. I think it might be a permissions error?!? When i detatch it and reattach it in visual studio it runs fine again. Any suggestions? ThanksJason
View 1 Replies
View Related
Apr 16, 2007
I recently installed the Evaluation Edition of SQL Server 2005 x64 and it appears that MS Visual Studio 2005 is installed in stead of SQL Server Business Intelligence Development Studio. When I choose new project the only template available is "Blank Solution". How do I get all the templates (i.e. Analysis Server Project, Integration Services Project, Report Model Project, Report Server Wizard project, etc.)?
Or would it be better to uninstall MS Visual Studio 2005 and attempt to reinstall BIDS?
View 4 Replies
View Related
Sep 4, 2007
I am new to visual studio and I am still not sure of all its components and features.
I installed visual studio 2005 standard edition but cannot find SQL Server Management Studio?
I guess this must be because it is not included with Visual studio 2005 standard. Is it included with VS 2005 professional?
I want to add pictures of products to my shopping site using an SQL database and I’ve been told that SQL Server Management studio is required as it is a graphical tool.
How would I go about obtaining the SQL server management studio. There seems to be different versions of SQL server that it is confusing to know which one to purchase.
Will the SQL server 2005 version that comes with Visual studio standard be sufficient for me now right? I want to create a shopping site with hundreds, perhaps even thousands of products. I want to use an SQL server 2005 database. The database will include ‘dynamically generated’ product images if that is the correct terminology.
My goodness, it seems I still have so much to learn.
Thanks
View 1 Replies
View Related
May 13, 2008
I have created a database under management studio and i want it to be connected in visual studio but it failed
the error msgs said that the database can't be connected coz the database with same name exits but that is not true
View 2 Replies
View Related
Sep 12, 2007
How do i get the database that i am using in visual studio into my SQL server management studio?
i need to create some scripts to create stored procedures on a live server.
View 1 Replies
View Related
Feb 29, 2008
I have SSRS in Visual Studio. I created a query that works fine in SQL Server Management Studio, but when pasted into Visual Studio I get the error "An expression of non-boolean type specified in a context where a condition is expected, near '('.
Here is the query. Can anyone help on why this isn't working? Thanks.
SELECT CASE WHEN MONTH(dbo.MAS_CCS_ARN_InvHistoryHeader.SOTransDate) = MONTH(GETDATE()) AND YEAR(dbo.MAS_CCS_ARN_InvHistoryHeader.SOTransDate) = YEAR(GETDATE())
THEN dbo.MAS_CCS_ARO_InvHistoryDetail.SOExtChargeAmount ELSE 0 END AS CurrentMonth,
CASE WHEN SubString(dbo.MAS_CCS_GL_Account.Account,1,3) = '400' THEN 'ALEDO' ELSE ' ' END AS Location,
dbo.MAS_CCS_ARN_InvHistoryHeader.SOTransDate, dbo.MAS_CCS_ARN_InvHistoryHeader.InvoiceNumber,
dbo.MAS_CCS_AR1_CustomerMaster.CustomerName, dbo.MAS_CCS_ARO_InvHistoryDetail.DetailSeqNumber,
dbo.MAS_CCS_ARO_InvHistoryDetail.LineType, dbo.MAS_CCS_GL_Account.Account, dbo.MAS_CCS_ARO_InvHistoryDetail.SOExtChargeAmount
FROM dbo.MAS_CCS_AR1_CustomerMaster, dbo.MAS_CCS_ARN_InvHistoryHeader, dbo.MAS_CCS_ARO_InvHistoryDetail,
dbo.MAS_CCS_GL_Account
WHERE dbo.MAS_CCS_AR1_CustomerMaster.CustomerNumber = dbo.MAS_CCS_ARN_InvHistoryHeader.CustomerNumber AND
dbo.MAS_CCS_ARN_InvHistoryHeader.InvoiceNumber = dbo.MAS_CCS_ARO_InvHistoryDetail.InvoiceNumber AND
dbo.MAS_CCS_ARO_InvHistoryDetail.SOGLSalesAcct = dbo.MAS_CCS_GL_Account.AccountKey
View 1 Replies
View Related
Sep 13, 2006
I have installed Visual Studio 2005 which includes SQL Server Express but not the Management Studio.
Can I install SQL Server Management Studio Express?
View 1 Replies
View Related
Aug 21, 2007
All:
I am trying to code the following SQL into an OLEDB data source but it is not allowing me to do so because I think the variables are nested in multiple SQL statements. I have seen other posts that suggest using a variable to store the SQL but I am not sure how it will work.
I would also like to mention that the OLEDB source executes from within a For Each loop that is actually passing the values for the variables, which was one of the reasons I got stumped on how I could have a variable store the SQL.
Here is the SQL:
select b.ProgramID, b.ProductCode, b.BuyerID, b.Vendor,sum(a.Ordered) As Qty_Pruchased
From SXE..POLine a INNER JOIN
(SELECT VIR_Program.ProgramID, VIR_ActiveSKU.ProductCode, VIR_ActiveSKU.BuyerID, Vendor
FROM VIR_Program INNER JOIN
VIR_ActiveSKU ON VIR_Program.ProgramID = VIR_ActiveSKU.ProgramID
INNER JOIN Vendor ON VIR_Program.VendorID = Vendor.VendorID
WHERE ProgramFreq=?) b
ON a.ProductCode = b.ProductCode
WHERE a.TransDate >=? AND
a.TransDate ?
Group By b.ProgramID, b.ProductCode, b.BuyerID, b.Vendor
Thanks!
View 5 Replies
View Related
Jun 14, 2007
Greetings,
I might have blown right by how to configure this...so here it goes...
In 2000 Query Analyzer I could configure whether I wanted to save any querys on exiting QA.
In SQL 2005 Management Studio where is the magical configuration bullet that will do the same thing for the query tabs????
Thanks...
bEH
View 5 Replies
View Related
Dec 15, 2006
Hi,
Need a little help on this one....
Using SQL Server 2005 and attempting to create the SQL Mobile CE example Publication and Subcripion. I was able to successfully create the publication on the main server engine but when trying to complete the wizzard for the SQL CE Database subscription I receive an error.
The Subscription fails using the wizzard with the following credentials:
Publisher: LAPTOP
PublisherDatabase: SQLMobile
Publication: SQLMobile
Subscriber: SQLMobile
HostName:
InternetUrl: http://localhost/SQLMobile
Web Server Authentication: Anonymous
PublisherSecurityMode: Windows Authentication
I have also created the Snapshot folder that is shared.
Here is the error I get when click Finish in the wizzard to create the Subscription:
- Synchronizing Data (Error)
MessagesAn incorrect or unsupported HTTP function call was made.
HRESULT 0x80004005 (28017)
The operation could not be completed.
PLEASE HELP....I Exausted all my attempts !
View 4 Replies
View Related
May 5, 2006
I'm very confused. I installed Visual Studio 2005 and thought I understood that SQL Server 2005 came with it, but it appears that it's SQL Server 2005 - Express. Can anyone tell me what I need to do in order to get Data Transformation Services loaded or the equivalent of DTS in SQL Express?
View 1 Replies
View Related
Jan 5, 2007
Hi peeps,
I need some help with passing parameters to a stored procedure from my visual basic code.
Unfortunately im a bit of a novice with Visual basic and therefore have very little experience with it.
I have written a stored procedure in VS 2005 which when executed from the server explorer appears to retrieve the results that I require. However I am at a loss for how to actually call this procedure from my visual basic code.
The stored procedure is fairly simple requiring 5 colums from 2 tables. The procedure requires a single parameter to be passed to it.
The code for the procedure is listed below:
/*
Name: usp_display_all_users
Description: Displays activeuser, personid, comment from table: pswds
Userid and sort from table: people
Where the username is like the parameter supplied.
Both tables joined on personid
Author: Iain Blackwood
Modification log: Change
Description Date Changed by
Created proc 02/01/07 Iain Blackwood
*/
ALTER PROCEDURE usp_display_all_users
(
@searchStr nvarchar(128) =''
)
AS
SELECT dbo.pswds.activeuser, dbo.pswds.personid, dbo.people.userid, dbo.people.sort, dbo.pswds.comment
FROM dbo.pswds INNER JOIN
dbo.people ON dbo.pswds.personid = dbo.people.personid
WHERE (dbo.people.sort LIKE @searchStr + '%')
ORDER BY dbo.people.sort
The Visual Basic application I am working on firstly requires login details from the user to build a connection string for the SqlConnection. Once these vaules have been succesfully retrieved the application should display a view with the data returned by the stored procedure (in this case the stored procedure should use the default input parameter value of an empty string to return every row of data from the tables). However I also require that the stored procedure be called if the user enters a search string into the relevant textbox.
I have managed to reproduce the view I require with the following code however this is using SQL commands passed directly to the an SqlDataAdapter and not by calling the Stored procedure that i have written.
Private Sub fillDataGrid()
' I NEED TO:
' 1: Fill the data set with all Accounts
' 2: Diplay the Data to the data grid
' delcare a new SQL connection
sqlCon = New SqlConnection(conStr)
' Delcare and build the SQL Command String: WILL BE REPLACED BY STORED PROCEDURE
Dim comStrPeople As String = "SELECT pswds.activeuser, pswds.personid, userid, sort, pswds.comment"
comStrPeople += " FROM pswds INNER JOIN"
comStrPeople += " people ON pswds.personid = people.personid"
comStrPeople += " ORDER BY sort"
' Display the command string: TEMPOARY
testlbl2.Text = comStrPeople
' Declare a new SQL data adapter
sqlDataAdapter1 = New SqlDataAdapter(comStrPeople, sqlCon)
Try
' Declare a new dataset
sqlDataSet = New DataSet
' fill the sql data adapter with data from dataset: called PeoplePswds
sqlDataAdapter1.Fill(sqlDataSet, "PeoplePswds")
' Fill the forms datagrid view with data from the Dataset table PeoplePswds
DataGrid1.DataSource = sqlDataSet.Tables("PeoplePswds").DefaultView
Catch ex As Exception
' Display suitable error message
MessageBox.Show("Unable to retrieve Account Data at sub fillDataGrid" + ex.Message)
End Try
End Sub
I Guess what im asking for is someone to show / help with how the stored procedure is called from the visual basic code and passed the parameter/s required.
Thanx Flakkie
View 6 Replies
View Related
Jun 17, 2008
Hi,
I am new to this environment, Can Someone help me in how to write the SSIS Packages using the Visual Studio in STEPS or using any links.
Thanks in Advance.
View 2 Replies
View Related
Dec 22, 2006
Hi
Are there any (important?) advantages of using data mining through DMX instead of Visual Studio 2005 on the SQL server 2005?
/Dennis
View 1 Replies
View Related
Jan 13, 2007
When I try to create a database that will have fields for a date and a time the only data type option in visual studio is datetime. This stores data as dd/mm/yyyy-00.00.
how can I set it to store either a date dd/mm/yyy or a time 00.00 but not both.
As it is now I cant seem to store a time.
Thanks
jim
View 4 Replies
View Related
Nov 4, 2007
Hi all,
Have tried running a dts package but Im unable to add the reference Microsoft.Sql.managedDts.
Is there any other way that i can do tat from Visual studio code behind page? I need to let the user to
trigger the package from the web application. Thks in advance.
Wei
View 1 Replies
View Related
Jun 19, 2006
Hi guys,
Can I use MS SQL server 7 for Visual Studio 2005 ?
View 1 Replies
View Related
Mar 30, 2007
visual studio 2005
how will i know what edition of visual studio i have? i have seen in connection strings the .sqlexpress. does it mean that it is express edition? but the owner of my cd told me that it is not.
can u help me build my connection string?
when i uninstall visual studio, will my files be lost? or i can still access them when i reinstall it? because i'm planning to uninstall and reinstall it but i don't want my files to be lost. tnx
View 4 Replies
View Related
Jul 29, 2006
I want to install SQL on the same machine as VS 2005 Pro for development.While trying to install the version of SQL that comes with the VS 2005 ProI'm getting error messages and the SQL engine will not start. Is itpossible to have the SQL install on the same machine as the VS 2005 or do Ineed to install the personnel edition instead? What should I do?Charles MacLeanMTS, Inc.
View 1 Replies
View Related