How Can I See The Data Of Some Fiels?
Hello,
I'm new using ASP NET , after I created a local application Visual Web Developer that connect to the remote server to be able to see the data but only shows up User ID, and Email, what can i do if I want to see the rest of the fiels as name, address and phone number??What do you suggest I should do? and How encrypt the data to avoid other people read it?
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
Adding New Data Fiels And Inserting Data
I have some website work lined up and it involves some simple modifications to a MS SQL 2000 server. What I'll need to do is add some new data fields and insert some data. I have some experience with databases - MS Access and MySQL, but I have never used or seen MS SQL 2000. My question is, is this a relatively simple thing to do for someone who hasn't used it before? I can do these things quite simply in Access or MySQL, so is MS SQL 2000 going to be any different? Also, does anyone know of any free tutorials online that would help me out? Thanks
View Replies !
View Related
Data Reader Or Data Adapter With Data Set?
I have used both data readers and data adapters(with datasets) in the projects that I have worked on. I am trying to get some clarification on when I should be using which one. I think I am doing this correctly but I want to be sure I am developing good habits. As the name might suggest, it seems like a datareader is for only reading data. I have read that the data adapter and dataset are for a disconnected architecture. Or, that they can be used for this type of set up. I have been using the data adapter and datasets when writing to a database and the datareader when reading from a database. Is this how these should be used? Is the data reader the best choice for reading data? Am I doing this the optimal way from a performance stand point? ......................................................thanks in advance
View Replies !
View Related
Help With Data Binding (passing Parameters To SQL Query And Retrieving Data To Populate Table)
I am working on building a data access website. The database has 12 tables (2001exp, 2001imp, 2002exp, 2002imp, 2003exp, 2003imp, 2004exp, 2004imp, 2005exp, 2005imp, 2006exp, 2006imp). All the tables have same no. of columns and names. (Commodity, Country, Month, Quantity, Value)The webpage has 4 dropdown menus (as shown in the image)Type [Imp, Exp]Year [2001, 2002, 2003, 2004, 2005, 2006]Month [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]Country [ list of 228]The inputs Type and Year combined tell me which table the data will be retrevied from i.e., if I select imp and 2003, the data will be retrevied from 2003imp. And the inputs month and year will be parameters for Where condition in the Query.I don't know how to combine (concatinate) the first 2 inputs and pass on to the SQL query.The output of the table should be just a table with top 10 values.I am rookie to programming and I would appreciate if anyone can help me. (I am using Visual Studio 2005 and SQL Server 2005) The SQL query is (I am passing 3 parameters: tablename, country, month)Declare @SQuery nvarchar(4000)DECLARE @TblName varchar(100)Declare @Country Int, @Month IntSet @Country=5310Set @Month=12SET @TblName = '[2005exp]'SELECT @SQuery = 'select top 10 a.commodity as Commodity, c.descrip_1 as Description,c.quantity_1 as Unit, sum(a.all_qy1_mo) as Quantity, sum(a.all_val_mo) as [Value],CASE WHEN (select sum(b.all_val_mo) from ' + @TblName + ' b where a.commodity=b.commodity)<>0 THEN (sum(a.all_val_mo)/(select sum(b.all_val_mo) from ' + @TblName + ' b where a.commodity=b.commodity))*100.00 ELSE NULL END as [U.S.Share(Value) %],CASE WHEN sum(a.all_qy1_mo)<> 0 THEN sum(a.all_val_mo)/sum(a.all_qy1_mo) ELSE NULL END as [Average Price]from ' + @TblName + ' a inner join concord c on a.commodity=c.commodityWHERE a.cty_code= ' + convert(varchar(10), @Country) +' and a.stat_month= ' + convert(varchar(10), @Month) +'GROUP BY a.commodity, c.descrip_1, c.quantity_1order by [Value] desc'EXEC sp_executesql @SQuery
View Replies !
View Related
How To Convert To Regular Text, Data Stored In Image Data Type Field ????
Hi,This is driving me nuts, I have a table that stores notes regarding anoperation in an IMAGE data type field in MS SQL Server 2000.I can read and write no problem using Access using the StrConv function andI can Update the field correctly in T-SQL using:DECLARE @ptrval varbinary(16)SELECT @ptrval = TEXTPTR(BITS_data)FROM mytable_BINARY WHERE ID = 'RB215'WRITETEXT OPERATION_BINARY.BITS @ptrval 'My notes for this operation'However, I just can not seem to be able to convert back to text theinformation once it is stored using T-SQL.My selects keep returning bin data.How to do this! Thanks for your help.SD
View Replies !
View Related
Pipeline Error-excel Source-data Reader Does Not Read In Meta Data
Hi all, i got this error: [DTS.Pipeline] Error: "component "Excel Source" (1)" failed validation and returned validation status "VS_NEEDSNEWMETADATA". and also this: [Excel Source [1]] Warning: The external metadata column collection is out of synchronization with the data source columns. The column "Fiscal Week" needs to be updated in the external metadata column collection. The column "Fiscal Year" needs to be updated in the external metadata column collection. The column "1st level" needs to be added to the external metadata column collection. The column "2nd level" needs to be added to the external metadata column collection. The column "3rd level" needs to be added to the external metadata column collection. The "external metadata column "1st Level" (16745)" needs to be removed from the external metadata column collection. The "external metadata column "3rd Level" (16609)" needs to be removed from the external metadata column collection. The "external metadata column "2nd Level" (16272)" needs to be removed from the external metadata column collection. I tried going data flow->excel connection->advanced editor for excel source-> input and output properties and tried to refresh the columns affected. It seems that somehow the 3 columns are not read in from the source file? ans alslo fiscal year, fiscal week is not set up up properly in my data destination? anyone faced such errors before? Thanks
View Replies !
View Related
XML Data Source .. Expression? Variable? Connection? Error: Unable To Read The XML Data.
RE: XML Data source .. Expression? Variable? Connection? Error: unable to read the XML data. I want my XML Data source to be an expression as i will be looping through a directory of xml files. I don't see the expression property or the connection property?? I tried setting the XMLData property to @[User::filename], but that results in: Information: 0x40043006 at Load XML Files, DTS.Pipeline: Prepare for Execute phase is beginning. Error: 0xC02090D0 at Load XML Files, XML Source [108]: The component "XML Source" (108) was unable to read the XML data. Error: 0xC0047019 at Load XML Files, DTS.Pipeline: component "XML Source" (108) failed the prepare phase and returned error code 0xC02090D0. Information: 0x4004300B at Load XML Files, DTS.Pipeline: "component "OLE DB Destination" (341)" wrote 0 rows. Task failed: Load XML Files Information: 0xC002F30E at Bad, File System Task: File or directory "d:jcpxmlLoadjcp2.xml.bad" was deleted. Warning: 0x80019002 at Package: The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. SSIS package "Package.dtsx" finished: Failure. The program '[3312] Package.dtsx: DTS' has exited with code 0 (0x0). Thanks for any help or information.
View Replies !
View Related
Data Conversion From String To Decimal When Saving Data To SQL Server 2005 Using An ADO Recordset
Hello, I am wondering what conversion rules apply, when a string, which contains a number, is saved to a SQL Server 2005 into a column of type decimal. This is the code I€™m using (C++): CString cValue = "0.75" _variant_t vtFieldValue; vtFieldValue = _variant_t(cValue) pRecordSet->Fields->Item["MyColumn"]->Value = vtFieldValue; "pRecordSet" is an ADO recordset. The database column "MyColumn" is of type "decimal(19,10)". The most important question for me is, if the regional settings of the database server or the regional settings of the client PC are considered during the conversion from the string to the decimal value. For example in standard French regional settings the "." would not be recognized as decimal separator. I am also wondering if the language of the database instance, in which this data is saved, is considered during this conversion or any other settings of this database instance. So my general question is: Does anybody know exactly what rules apply during the above mentioned conversion? Thank you for your help. Regards, Volker
View Replies !
View Related
I Am Accessing Data Using Data Access Pages In IIS 7 To SQL Server 2005 Authentication Is Failing
is there a step by step paper to get there? here is what i need to consider. I Iwill have many customers that will need their own set of records and access pages "branded for their company" each customer will have many clients. I am hosting this application on a windows 2003 server with SQL 2005 server enterprise. I am using windows authentication, I have created a username in windows, then i added the windows user in SQL management studio in security, granted "DB Read" and "DB write" and again under the database security tab. still from the web authentication fails. i must be nissing a step or two? I expect to set up a username for each database as i setup new customers.
View Replies !
View Related
Having Trouble Following Tutorial - Working With Data In ASP.NET 2.0 :: Creating A Data Access Layer
HiI'm having problems following the tutorial on creating a data access layer - http://www.asp.net/learn/dataaccess/tutorial01cs.aspx?tabid=63 - when I try to compile in Visual Studio 2005 I get namespace could not be found. I followed exactly the tutorial - I created a dataset and added this code in my aspx page. <asp:GridView ID="GridView1" runat="server" CssClass="DataWebControlStyle"> <HeaderStyle CssClass="HeaderStyle" /> <AlternatingRowStyle CssClass="AlternatingRowStyle" />In my C# file I added these lines... using NorthwindTableAdapters; <<<<<this is the problem - where does this come from? protected void Page_Load(object sender, EventArgs e) { ProductsTableAdapter productsAdapter = new ProductsTableAdapter(); GridView1.DataSource = productsAdapter.GetProducts(); GridView1.DataBind(); }Thanks in advance
View Replies !
View Related
Physical Setup: 1 Data File Vs Multiple Smaller Data Files
Hello all. Before my arrival at my current employer, our consultantsphysically set up our MSSQL 7 server as follows:drive c: contains the mssql enginedrive d: contains the transaction logdrive e: contains the data filesNo filegroups were set up and the data files consist of only 1 largephysical file. Currently, our data file is >10GB. When I was trained onthe physical aspects of sqlserver, I was told to never create physical files[color=blue]> 2048MB each. If I did, I could expect inefficient physical storage of[/color]data and slower performance (due to the OS).Our server has 2 RAID-5 arrays. Drive c: and e: are located on the firstarray and drive d: on the second. We're running Windows 4.0 NT Server SP6with NTFS.Can someone comment on the use of 1 single large data file vs. more smallerdata files?
View Replies !
View Related
Truncation Of String Data With Data Reader Source Connecting To ODBC DSN
A data reader is using a connection manager to connect to an ODBC System DSN . A query in the SqlCommand property is provided. Data is being truncated in the only string column . The data type in data reader output-->external columns shows as Unicode string [DT_WSTR] Length 7. The truncated output in a text file is the first 3 characters from left to right . Changing the column order has no effect. A linked server was created in SQL Server Management Studio to test the ODBC System DSN using the following: EXEC sp_addlinkedserver @server = 'server_name', @srvproduct = '', @provider = 'MSDASQL', @datasrc = 'odbc_dsn_name' Data returned using "OPENQUERY" does not truncate the string column indicating that the ODBC Driver returns data as expected with sql 2005, but not with the Data Reader. Any assistance would be appreciated. Thanks,
View Replies !
View Related
Data Flow Task Error To Extract Data From Sql Server To Excel
Hi All, I want to export data from SQL Server2005 to an Excel spreadsheet thru "Data Flow Task". I am using OLE DB for SQL Server for the source connection and a Connection To Excel as my destination source. The Excel spreadsheet (2003) exists and has the first row with column names. I don't have any warnings before trying to execute. The SQL datable fileds are i) ID - Int ii) RefID iii) txtRemarks - nvarchar(MAX) iv) ddlWaterLevel - nvarchar(50) While executing the tasks, I got the error Error: 0xC0202025 at Data Flow Task, Excel Destination [427]: Cannot create an OLE DB accessor. Verify that the column metadata is valid. Error: 0xC004701A at Data Flow Task, DTS.Pipeline: component "Excel Destination" (427) failed the pre-execute phase and returned error code 0xC0202025. After analysing I found in the DataFlow --> Excel destination --> Advanced Editor for Excel Destination, the default data type for txtRemarks shows as "Unicode string [DT_WSTR]". But this is supposed to be "Unicode text stream [DT_NTEXT]". Even if I change the data type in the design time, It doesn't accept. Please do help me out. thanks Sanra
View Replies !
View Related
Collapsing/Expanding Group Data In Table And Matrix Data Regions
Hi, Is it possible to create Expand/Collapse functionality for the grouped data in Table and Matrix data regions? Essentially, the idea is for the user to be able to see the group/subgroup data if she wishes to by clicking on (+/-) symbols, as is usually the case in Tree View style data grid control in web apps. Any ideas how to accomplish the same in reporting services? Thanks.
View Replies !
View Related
Report Builder - Read Data From SQL Server With Ntext Data Type
Hi all, I have a column in SQL server which is of type ntext. Selecting the specific column to view it in report builder, an error message appears with the following description: - Cannot run this report. The grouping expression 'nameofcolumn' returns the datatype binary. The Grouping Expression cannot return binary data. Report Builder recognises this as if it was an image... Thanks in advance!
View Replies !
View Related
Exporting Data From Report Server To .pdf Data Formats Receive SQL Error
Hi, While trying to Export a Report using SQL 2005 to a .pdf file I am getting the following Stack. I read some article (MSDN) [Can you check this MS article [Article ID : 914398 ]http://support.microsoft.com/kb/914398] to upgrade the SQL 2005 TO SP 1. I upgraded to SP2. But some other error is displayed. (I have already posted a Stack on that one about 2 days back) Your help is welcomed. Thanks & Regards, Nik Server Error in '/Reports' Application. -------------------------------------------------------------------------------- Thread was being aborted. 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.Exception: Thread was being aborted. 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: [Exception: Thread was being aborted.] [Exception: An error occurred during rendering of the report.] [Exception: An error occurred during rendering of the report.] [Exception: The operation has timed out. The report server has canceled the operation.] Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream outputStream, String& mimeType, String& fileNameExtension) +489 Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean isAbortable, String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension) +924 Microsoft.Reporting.WebForms.ServerReportControlSource.RenderReport(String format, String deviceInfo, NameValueCollection additionalParams, String& mimeType, String& fileExtension) +84 Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +153 Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +75 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
View Replies !
View Related
Import Data From Excel-Sheet Via OleDb In VB.Net - How To Get A Columns Data As String?
Hello, i want to import data from an excel sheet into a database. While reading from the excel sheet OleDb automatically guesses the Datatype of each column. My Problem is the first A Column which contains ~240 Lines. 210 Lines are Numbers, the latter 30 do contain strings. When i use this code: Code BlockDim sConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & conf_path_current & file_to_import & ";Extended Properties=""Excel 8.0;HDR=NO""" Dim oConn As New OleDb.OleDbConnection(sConn) Dim cmd1 As New System.Data.OleDb.OleDbCommand("Select * From [Table$]", oConn) Dim rdr As OleDb.OleDbDataReader = cmd1.ExecuteReader Do While rdr.Read() Console.WriteLine(rdr.Item(0)) 'or rdr(0).ToString Next it will continue to read the stuff till the String-Lines are coming. when using Item(0), it just crashes for trying to convert a DBNull to a String, when using rdr(0).ToString() it just gives me no value. So my question is how to tell OleDB that i want that column to be completly read as String/Varchar? Thanks for Reading - Pierre from Berlin [seems i got redirected into the wrong forum, please move into the correct one]
View Replies !
View Related
Uploading An Image And Using An ASP.NET 2.0 Data Source Control Code To Store The Binary Data PROBLEM
I want to use a Stored Procedure (and add Parameters) instead of ADO.NET Code from the following article, but I'm not seeing something; could someone help me out? Note: It's Visual Basic 2005 code, and that's what I want to use. http://aspnet.4guysfromrolla.com/articles/120606-1.aspx And code for article: http://aspnet.4guysfromrolla.com/code/BLOBsInDB.zip If you look at this article, under the section: Uploading an Image and Using an ASP.NET 2.0 Data Source Control Code to Store the Binary DataIt has the following Code for the DetailsView UploadPictureUI_ItemInserting: <asp:SqlDataSource ID="UploadPictureDataSource" runat="server" ConnectionString="..." InsertCommand="INSERT INTO [Pictures] ([Title], [MIMEType], [ImageData]) VALUES (@Title, @MIMEType, @ImageData)"> <InsertParameters> <asp:Parameter Name="Title" Type="String" /> <asp:Parameter Name="MIMEType" Type="String" /> <asp:Parameter Name="ImageData" /> </InsertParameters></asp:SqlDataSource> I tried to use the following, but It's not correct: <asp:SqlDataSource ID="UploadPictureDataSource" runat="server" ConnectionString="..." InsertCommand="InsertPicture" InsertCommandType="StoredProcedure"> <InsertParameters> <asp:Parameter Name="Title" Type="String" /> <asp:Parameter Name="MIMEType" Type="String" /> <asp:Parameter Name="ImageData" /> </InsertParameters></asp:SqlDataSource> How do I simply replace the INSERT INTO Statement with a StoredProcedure, and set the parameters? Currently I have the Insert working, but the image shows up as an image placeholder and that's it. ps: The stored procedure I use is below, and you might want to download the VB Code at the bottom of the article.ALTER PROCEDURE dbo.InsertPicture (@PictureID int, @Title varchar (50),@MIMEType varchar(50), @ImageData varbinary ) ASINSERT [Pictures] ([Title], [MIMEType], [ImageData]) VALUES (@Title, @MIMEType, @ImageData) RETURN
View Replies !
View Related
Asp.net Page Is Unable To Retrieve The Right Data Calling The Store Procedure From The Dataset/data Adapter
I'm trying to figure this out I have a store procedure that return the userId if a user exists in my table, return 0 otherwise ------------------------------------------------------------------------ Create Procedure spUpdatePasswordByUserId @userName varchar(20), @password varchar(20) AS Begin Declare @userId int Select @userId = (Select userId from userInfo Where userName = @userName and password = @password) if (@userId > 0) return @userId else return 0 ------------------------------------------------------------------ I create a function called UpdatePasswordByUserId in my dataset with the above stored procedure that returns a scalar value. When I preview the data from the table adapter in my dataset, it spits out the right value. But when I call this UpdatepasswordByUserId from an asp.net page, it returns null/blank/0 passport.UserInfoTableAdapters oUserInfo = new UserInfoTableAdapters(); Response.Write("userId: " + oUserInfo.UpdatePasswordByUserId(txtUserName.text, txtPassword.text) ); Do you guys have any idea why?
View Replies !
View Related
System.Data.SqlClient.SqlException: Error Converting Data Type Numeric To Decimal.
Hi There, I'm using C# to get a value for a DOUBLE precision variable, called "Length", from a textBox using the following line: Length = Convert.ToDouble( txtLength.Text ) I'm also using the following lines to prepare my stored procedure call: arParms[9] = new SqlParameter("@Length", SqlDbType.Decimal, 5); arParms[9].Value = record.Length; My stored procedure has the following parameter definition: @Length decimal(9,3) My problem is that if someone types a value bigger than 999999 in the textbox he will get for sure the following error: System.Data.SqlClient.SqlException: Error converting data type numeric to decimal. I don't know how to either make sql or C# to truncate the value or catch the exception to automatically assign 0 to the parameter. Please Help. Moshe
View Replies !
View Related
How To Optimize Data Import With Huge Volumes And Joins Across Data Sources Not All SQL Server Based?
I need to periodically import a (HUGE) table of data from an external data source (not SQL Server) into SQL Server, with the following scenarios: Some of the records in the external data source may not exist in SQL.Some of the records in the external data source may have a different value at different imports, but this records are identified univocally by the same primary key in the external datasource and in SQL Server.Some of the records in the external data source may be the same in SQL. Due to the massive volume of the import, I would like to import only the records which are different from what I have in SQL Server (cases 1 and 2 above). In fact case 2 is the most critical. I thought of making a query with a left outer join between the data in the external data source table (SOURCE) and the data in the SQL Server table (DESTIN). The join is done on the respective primary keys (composed keys of up to 10 columns) and one of the WHERE conditions will be that the value in SOURCE is different from the value in DESTIN. The result of this query would be exactly what I need to import. How to do this in SSIS??? I couldn't figure out how to join tables in different data sources yet. In fact I cannot write a stored procedure to do that, since one of the sources is in a datasources not SQL Server. I have seen the Lookup transformation in this article http://www.sqlis.com/default.aspx?311 but this is not exacltly what I want to do. Another possibility is to use the merge join, but due to the sorting I believe its performances would be terrible! Thanks in advance for your suggestions!
View Replies !
View Related
Exported Flat File Data Will Not Import To Same Table Without Extensive Data-type Manipulation
I'm moving data between identical tables and have to use a flat file as an intermediary. I thought: "No problem, SSIS can do a quick export to a file, then move the file to another server, then use SSIS to import the data to the new server." Seems simple, right? I'm hitting all sorts of surprising data conversion errors. I used the export wizard to create the export package. This works fine. However using the same flat file definition, the import package fails -- even when I have no destination. That is I have just one data flow task that contains only one control: the Flat File source. When I run the package the flat file definition fails with data type conversion and truncation errors. One of the obvious errors is for boolean types. The SQL field is a bit, SSIS defined the column as DT_BOOL, the output of the data are literal text values "TRUE" and "FALSE". So SSIS converts a sql datatype of bit to "TRUE" and "FALSE" on export, but can't make the reverse conversion on import? Does anyone else find this surprising? I would expect that what SSIS exports, it can import given all the same table and flat file definitions. Is SSIS the wrong tool to do such simple bulk copies? I'd like to avoid using BCP because this process will need to run automatically within SQL Agent so we can leverage all the error tracking and system monitoring.
View Replies !
View Related
Problem Loading Data From FlatFile Source Data For Column Overflowed The Disk I/O Buffer
Hi i am trying to do a straight forward load from a Flatfile source , i have defined the columns according to the lenghts defined in the Data Dictionary Provided but when i am trying to run the Task i am encounterring this error The column data for column "Column 20" overflowed the disk I/O buffer. I tried to add another column 21 at the end and truncate or leave that column unmapped to destination but the same problem occurs for column 21 what should i do to over come this . In case of Bad Data how to clean up the source.. Please help me with this
View Replies !
View Related
Taking Data From A Different Databases/Data Warehouses Using A Sequel Server 2005 Based Database.
I'm in the middle of developing a Database for a hospital that measures its audits, inhouse operations, and finance. What we currently have and do everyday is collect data from a large database that is real time with patient data, progess, infomation, etc and dump it into a data warehouse that runs on TSI/Eclipsys. We run reports using a number of programs and dump it into Excel sheets that have charts, reports, etc. This Database for which I'm developing won't come soley from the TSI/Eclypsys source, but this is the only source thats updated regularly. I don't want to have in sync with TSI/Eclipysys in fear that every day when it updates data may be lost, not read, or worse won't be up date if there is a problem. My question is is it possible to run a query from Sequel Server 2005 that will take that data upon request using the reporing features on Sequel Server 2005. i.e. What if I need to run a report on measure B in department 12 from Jan 1-Feb 1, instead of being in sync, can I just write queries to take that information rather than double the data and take up twice the space and trouble. FYI, these datatypes rarely change in the TSI/Eclipsys data warehouse. This sure was long question and didn't intended it to be . Thanks for listening and hope to hear back. Stephen
View Replies !
View Related
System.Data.SqlClient.SqlException: Syntax Error Converting The Varchar Value 'V' To A Column Of Data Type Int
I am using a stored procedure which returns a value of charecter datatype 'V' to the calling program.I am getting an sql exception System.Data.SqlClient.SqlException: Syntax error converting the varchar value 'V' to a column of data type inti didnot define any int datatype in my tablethis is my codeSqlCommand com = new SqlCommand("StoredProcedure4", connection);com.CommandType = CommandType.StoredProcedure; SqlParameter p1 = com.Parameters.Add("@uname", SqlDbType.NVarChar);SqlParameter p2 = com.Parameters.Add("@opwd", SqlDbType.NVarChar);SqlParameter p3 = com.Parameters.Add("@role", SqlDbType.NVarChar);p3.Direction = ParameterDirection.ReturnValue;p1.Value = username.Text.Trim();p2.Value = password.Text.Trim();com.ExecuteReader();lblerror2.Text = (string)(com.Parameters["@role"].Value); can your figure out what is the error ? Is it a coding error or error of the databse
View Replies !
View Related
Memo Data Type Import Error While Importing Data From Access File Into SQl Server 2005
I have one column in SQL Server 2005 of data type VARCHAR(4000). I have imported sql Server 2005 database data into one mdb file.After importing a data into the mdb file, above column data type converted into the memo type in the Access database. now when I am trying to import a data from this MS Access File(db1.mdb) into the another SQL Server 2005 database, got the error of Unicode Converting a memo data type conversion in Export/Import data wizard. Could you please let me know what is the reason? I know that memo data type does not supported into the SQl Server 2005. I am with SQL Server 2005 Standard Edition with SP2. Please help me to understans this issue correctly?
View Replies !
View Related
Retrieve Text File Data In SSE For Data Acquisition System
Hey All, I am developing a data acquisition system which monitors the amount of energy that a user consumes in different parts of a house and displays the information in real time on their computer screen. I am collecting the data through tranducers attached to the circuit breakers in the breaker box and sending the data to analog-to-digital converter channels in a MCU. I am retrieving the data from the serial port and storing it to a text file. Each line of data in the text file represents three fields which are separated by commas. I will be reading data from multiple data collection boxes so the first field is the unit number, the second field represents the analog-to-digital converter channel number from each unit, and the third field is the data that is collected from the ATD channel. I am trying to use SSE to retrieve the data from the text file, and parse each line of data into individual columns in a database. Then I want to be able to extract the data associated with a particular ATD channel number from the database and display it in the appropriate text field on a windows form. I've got the MCU programmed. I have no problem collecting the data from the serial port, and I can do the visual basic programming okay. I have absolutely no clue how to read the data into the database, continuously read new values into the databse, and then access the stored data to update the text fields on the form. Please help if you can, I've been working on this specific problem for a couple of weeks and I'm not making any progress. Thanks.
View Replies !
View Related
How Can I Return Data From A Database And Fill A Data Grid View?
Hi ! I have a textbox and a Search button. When the user inputs a value and press the button, i want a datagrid to be filled. The following code runs: Dim connect As New Data.SqlClient.SqlConnection( _ "Server=SrvnameSQLEXPRESS;Integrated Security=True; UID= ;password= ; database=dtbsname") connect.Open() Dim cmd As New SqlCommand Dim valor As New SqlParameter("@valor", SqlDbType.VarChar, 50) cmd.CommandText = "Ver_Contactos_Reducido" cmd.CommandType = CommandType.StoredProcedure cmd.Connection = connect cmd.Parameters.Add(valor) cmd.Parameters("@valor").Value = texto Dim adapter As New SqlDataAdapter(cmd) Dim ds As New System.Data.DataSet() adapter.Fill(ds) GridViewContactos.DataSource = ds GridViewContactos.DataBind() connect.Close() I drag a datagrid on the page and only changed its Id. Into the SQL database the stored procedure is the following: ALTER PROCEDURE [dbo].[Ver_Contactos_Reducido] (@Valor VARCHAR(100)) AS BEGIN SET NOCOUNT ON; SELECT NombreRazonSocial, Nombre, Apellido,TelefonoLaboral, Interno, TelefonoCelular, Email1, Organizacion FROM CONTACTOS WHERE NombreRazonSocial = @Valor OR Nombre = @Valor OR Apellido = @Valor OR TelefonoLaboral = @Valor OR Interno = @Valor OR TelefonoCelular =@Valor OR Email1 = @Valor OR Organizacion= @Valor END When i run the page i can't see the datagrid, and after i enter a text and press the button, nothing happens. What am i doing wrong?? Thks!!
View Replies !
View Related
Reading Data Using Data Reader With Sql Server 2005 Conn
Hi I have written a piece of code for Login form which reads the user id and password from db. It works fine with the Sql server 2000 but I get a error with Sql server 2005. SqlConnection conn = new SqlConnection("Data Source=D\SQLEXPRESS;Initial Catalog=model;Integrated Security=True"); SqlCommand cmd = new SqlCommand("Select * from JsLoginDetails", conn); conn.Open(); SqlDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { if ((Login1.UserName == dr.GetValue(0).ToString()) && Login1.Password == dr.GetValue(1).ToString()) { Response.Redirect("MainJs.aspx"); } else { Login1.FailureText = "Invalid Userid Or Password"; } } dr.Dispose(); conn.Close(); } I get and error Invalid object name 'JsLoginDetails'. pls help thnksdiv
View Replies !
View Related
How To Data Transfer From Excel To Microsoft SQL Server Data Base Using .Net.
Hai All, How to Data Transfer From Excel to Microsoft SQL Server Data base Using .Net. I have one Excel Sheet in that sheet 15 Fields (attributes) and 3000 records are there. In this 3000 records i want to store this (Excel) data into 5 related tables on Sql Server Database Using .Net. How to store Excel Sheet data into Sql Server database. Please help me as soon as possible. Thank You Very Much...Have a Good Day... With RegardsSridhar
View Replies !
View Related
Update Query Containg Static Data And Data From Another Table.
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 Replies !
View Related
On The Subject Of Data Warehouses, Data Cubes && OLAP&….
On the subject of Data Warehouses, Data Cubes & OLAP….I would like to speak frankly about Data Warehouses, Data Cubes andOLAP (on-line analytical processing). Has it dawned on anyone elsethat these buzz words were created by some geek who decided to take astab at marketing? Knowing that to the backwoods manager who knowslittle of technology that new innovative names for old concepts wouldhelp to sale their products.I mean seriously, what is the story here? In a nut shell, and pleasestop me if you disagree, but isn’t a data warehouse simply adatabase? Can’t you do everything on a conventional databaselike SQL Server, Oracle or DB2 that you can do on these newproprietary Data Warehouse constructs? I mean who are they trying tofool?Take a look, for instance, at Data Cubes. Who hasn’t noticedthe striking similarity between data cubes and views used in all themore robust databases? Also, what about OLAP? OLAP is nothing morethan a report generator. There’s nothing you can do with thesemillion dollar price tagged Data Warehouse total solution packagesthat I can’t do with SQL Server, Oracle or DB2…for thatmatter Microsoft Access.As an example some sales people for Metadata Corporation has the VicePresident of I.T. in Nashville, for Healthspring, sold on their totalsolution data respository which is such a scam. All they had to dowas throw a couple of buzzwords at him and they have him hypnotized.Personally, I feel that these kinds of marketing practices undermineour industry. It helps to unravel what little standards orconsistency we have. What do you guys think?Stuart
View Replies !
View Related
US - Los Angeles - Sr Business/Data Analyst (SQL Data Mining Exp Required)
JOB SUMMARY:The Business Analyst will be responsible for much of the modeling,tracking, reporting, analysis, and forecasting. The successfulcandidate will work with Business Managers to develop relevantreporting and conduct critical data analysis pertient to theunderstanding and improvement of customer behavior. The BusinessAnalyst will provide analytic support in determining the factorsaffecting website visit behavior, registration, conversion to paidmemberships and customer retention rates along with developing andmaintaing key business metric reports for Senior Management.The company seeks an energetic, intellectually curious, intrinsicallydriven individual who can get things done both individually andthrough others. The successful applicant will have proven analyticbackground (ideally with a consumer-based company).ESSENTIAL FUNCTIONS:Collaborate with Technical Resources and Business Managers to gatherand analyze data.Conduct periodic and ad hoc analysis of data pertinent to theoperation and performance of the company's website and subscriptionservices.Conduct SQL quereis and work with other data extraction, reporting andanalytic tools to develop management reporting in order to gauge,monitor and pinpoint areas for improvement with the company'ssubscription services.Build reports based on needs analysis derived from Business Managers.Develop and maintain multi-department reporting based on keyperformance indicators and a clear understanding of operationalobjectives.Diagnose and communicate to Business Managers operational trends thatenhance or impede conversion of website traffic to paying customers.Support companies effort Develop methodology to segement customerdatabase for the purpose of implementing more successful one-to-onemarketing campaigns based on user demographic, psychographic andsuccess profiles.JOB QUALIFICATIONS:3-5 years experience in a Business Analytics positionB.A. or advanced degree in Economics, Business or closely relatedstudyAble to translate strategic business logic into technical reportrequirementsKnowledge and experience in SQL, MSQL or Oracle database queriesKnowledge and experience with WebTrends, Crystal Reports and otherenterprise level business analytic and OLAP reporting tools isstrongly preferred.Superior knowledge of relational databases.Able to communicate clearly and professionally with all levels of anorganization.Strong interpersonal, written and verbalcommunication skills with demonstrated ability to work in a teamenvironment.
View Replies !
View Related
|