I have a text column in my db which stores more than 8000 characters. When I retrieve the values from the column in query analyzer (I have set the output buffer to 8000), it only shows me first 8000 chars only. How do I display all the text from the text field?
Hi, Assume I have a table name "myTime". This table is simply only have 1 (one) DATETIME field "MyTestTime" (also serve as a primary number).Table MyTime- MyTestTime : SQLTYPE DATETIMETo insert a new row into this field, I simply wrote :SqlCommand sqlCommand = new SqlCommand("insert into MyTime values('2006-01-09')", sqlConnection); I got the value of "2006-01-09" from a textbox or other relevan control.I realize when I try to use "SELECT * FROM MyTime" statement, MSSQL server 2000 automatically convert my date value from "2006-01-09" to "01/09/2006" (from YYYY-MM-DD to MM/DD/YYYY). I don't know why this one must be converted to MM/DD/YYYY automatically (I believe this behavior is depend on some "setting option" in my MSSQL server - but I don't know which one).The challenge is :In my country, the actual date format is like German Date format (DD-MM-YYY). Well I know this is only "Customization" problem. But how insert datetime value given from sql query to a datetime variable?// Connect to database, make a query, get the datareader result, and bla bla blaDateTime aDateTime = new DateTime;aDateTime = Convert.ToDateTime(myDataReader["PostDate"].ToString());// close connectionMy question isHow can I make sure that aDateTime's day is 09 not 01. How my program know that 09 is day not month. I can't use string.split() method because it's possible that my database setting will change from "mm-dd-yyyy" to "dd-mm-yyyy"thanks
Hi, Nobody have idea to get a field in "select" statement by its position (without name then)?
My scope was to duplicate a row into a table with identity column getting all row except the identity one, that i want to provided by constant expression.
I am so frustrated, I don't know what to do. I have spoken to everyone that I know on how to explain this error message, but my supervisor wants to dispute every thing I tell him.
Could someone PLEASE explain the following error message and how I can go about finding what fields that it's talking about?
e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: There is no data for the field at position 15., ; Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: There is no data for the field at position 15.
I have two environments (2 seperate companies on seperate servers). In Environment #1 (referred to as Env1 from this point on) that runs the report and generates a few of these errors (10 for an example). In Environment #2, the same report only modified SLIGHTLY for the other company, runs the report and generates 50 errors. I'd be more than happy to post the log here if someone needs it.
Someone, please, save me from logfile hell. I have told this supervisor that "No data for the field" pretty much means that there was NO DATA RETURNED. We know for a FACT that these two environments are completely different. One runs on real servers and the other is running on partial real servers and virtual servers. We have identified several differences in the configurations, but he wants me to nail down EXACTLY what is causing this error. Please remember, "No Data" is not a good enough response for this person.
Please, for the love of all that is Chocolate, HELP!!!!!!!!!!!!!!!
Thanks in advance,
Jim Evans Microsoft Certified Application Developer
I am getting the following errors in my reporting server log. Can anyone help me?
ReportingServicesService!processing!11!8/22/2006-01:04:04:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: There is no data for the field at position 10., ; Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: There is no data for the field at position 10. ReportingServicesService!processing!11!8/22/2006-01:04:04:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: There is no data for the field at position 14., ; Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: There is no data for the field at position 14. ReportingServicesService!processing!11!8/22/2006-01:04:04:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: There is no data for the field at position 18., ; Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: There is no data for the field at position 18. ReportingServicesService!processing!11!8/22/2006-01:04:04:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: There is no data for the field at position 22., ; Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: There is no data for the field at position 22.
Hi, Let's say I have 1000 registered users in database table and each of them has numeric ranking value. How can I get the position of each user in comparison to other users ranking value?
Im using many source tables in a dataflow from which data has to be union in to a single table.While doing this i have to pull the table names in to the destination table.How to get the table names as column values?
Hello, I am using datareader to retrive the varchar (max) value from the database. But it is reteriving only 8000 why ? I am not using normal varchar datatype. Below is the sample code. Convert.ToString(_oDr["MyVar"]) where _oDr is the datareader MyVar is defined of type varchar (max) in the sql 2005 database. Any help will be appreciated.
I would appreciate help with retriving the ID of the last record inserted. Have spent considerable time in forums and google but can't find anything that works for me. Here is my VB Code Dim queryString As String = "INSERT INTO [DUALML] ([UseriD], [Company]) VALUES (@UseriD, @Company)" Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand dbCommand.CommandText = queryString dbCommand.Connection = dbConnection Dim dbParam_useriD As System.Data.IDataParameter = New System.Data.SqlClient.SqlParameter dbParam_useriD.ParameterName = "@UseriD" dbParam_useriD.Value = useriD dbParam_useriD.DbType = System.Data.DbType.Int32 dbCommand.Parameters.Add(dbParam_useriD) Dim dbParam_company As System.Data.IDataParameter = New System.Data.SqlClient.SqlParameter dbParam_company.ParameterName = "@Company" dbParam_company.Value = company dbParam_company.DbType = System.Data.DbType.[String] dbCommand.Parameters.Add(dbParam_company) Dim rowsAffected As Integer = 0 dbConnection.Open Try rowsAffected = dbCommand.ExecuteNonQuery Finally dbConnection.Close End Try Return rowsAffected End Function
Baby writes "how to retrive data from four table four tables have same column number and name i am trying to retrive one column data from all the table i am trying these :- to get the result
select mutual_fund.customer_id,insurance.customer_id,fixed_dep.customer_id,home_loan.customer_id from mutual_fund,insurance,fixed_dep,home_loan where (mutual_fund.customer_id=fixed_dep.customer_id and mutual_fund.customer_id=home_loan.customer_id and fixed_dep.customer_id=home_loan.customer_id) or (mutual_fund.customer_id=fixed_dep.customer_id and mutual_fund.customer_id=insurance.customer_id and fixed_dep.customer_id=insurance.customer_id) or (mutual_fund.customer_id=home_loan.customer_id and mutual_fund.customer_id=insurance.customer_id and home_loan.customer_id=insurance.customer_id) or (fixed_dep.customer_id=home_loan.customer_id and fixed_dep.customer_id=insurance.customer_id and home_loan.customer_id=insurance.customer_id)
the comparision working in the query please help me tell me how to solve my problem"
Hi I am trying to retrive data from table store in .sdf database file but not able to do it. where i will use select * from xyz in project. I am developing it on desktop using vc++ 2005 in SQL server compact edition.
am using
hr = pICmdText->Execute(NULL, IID_NULL, param, NULL, NULL); It is not easy for me to see data of table from sdf file
Hi Every one I m using FCKeditor in my web application and my requirement is to create and edit documents in FCKeditor. The problem is in storing the data. it is not storing the data in the DB. its only stors some html code but it is incomplete. Please some one Solve this problem
i have a textbox which a user enters a numeric value i want it to use SqlDataSource and check if the value exists in any of the tables. in my text box the users would enter starting from '100000' or '200000' i want it to check the view that starts the # with '100000' and 2ed view starts '200000' With this i can check in one of the tables and make the selection. <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:imacstestConnectionString %>" SelectCommand="SELECT [ReportNumber] FROM [AppraisalSummaryBlue] WHERE ([ReportNumber] = @ReportNumber)"> <SelectParameters> <asp:ControlParameter ControlID="txtReport" Name="ReportNumber" PropertyName="Text" Type="String" /> </SelectParameters> </asp:SqlDataSource>
How can i make this possible ? i was thinking putting a second sqldatasource and have that check the second view but how can i make the textbox goto the correct selectcommand ?
I try to retrive an xml portion (<points><point><x>1</x></point></points>) stored in a varchar(max) column, this is my code dr = cmd.ExecuteReader(); _xmlFile = dr.GetSqlString(dr.GetOrdinal("XmlJoin")).ToString(); Label1.Text = _xmlFile; and this is what I get "12"Maybe I missed something to get the whole XML String
I am tring to figure out how to retrieve the value of a global variable from s SQL task, the value for the Global variable is set in a Active Script Task. Any help is greatly appreciated.
Hi, Can any one suggest me how to retrieve most recent job from msdb..sysjobhistory table?
I want to supply the job name which has more than 1 steps. Step 1 or more is already completed ( success/failure) and in the last step I am trying to retrieve sysjobhistory.messages(success/failure) stored in the sysjobhistory table for the steps already executed. I want the records related with last/current job executed.
i have write a store procedure which take few input and then backup the database and at the same time it's restore the database with new name, but i m hving a error code. what this program do in restore section, it's read the backup file and all give me list of all the file with the location and then i can rename them. actually the purpose of doing this is to create a new database on behalf of old database. plz have alook code PLZ, PLZ help me, it's really geting headach
Dear Friends, Hi I am having a problem while showing Products from SQL Server database. Exactly I have a table named Products which has some Products posted by admin I want to show some latest Products on my default page based on DateTime which are displayed like show last week articles,show last two weeks articles etc on button click I written my SQL query like: searchquery = "select * from Prducts where Date between '" + System.DateTime.Now.AddDays(-7).ToShortDateString() + "' and '" + System.DateTime.Now.AddDays(-1).AddHours(23).AddMinutes(59).AddSeconds(29).ToShortDateString() + "'"; If any body knows plz help me
we have a problem in my system that will say it now.
we have two departments can access to the same database , the first department fill all the fields in the application(web_enabled), the second department can fill some fields from whole the fields and the remaining fields are set as default values because they don't have access to the remaining items. the problem here, when the first department go to fill the fields and then press save to save the filled information , will operation successful, but when the second one want to fill the fields then click save , will appear this error " there is no row at position 0".
note that we can't to change any thing in the code , i hope to find the answer for our problem thru database. with my regards
Is there a neat way to find an ordinal value from a table,for example the median or 95th percentile value in a column,without walking through the table in ascending or descendingorder?Thanks,Jim GeissmanCountrywide Home Loans
When i use the "run package task" to run a package in the sqlserver storage,the package will run at the storage server or the server call this package?