I have a Multiline Textbox in my application.The value from the textbox is updates in a SQL
table.The problem i have is
If I type in the textbox 1211 London street Sussex <br> UK <br>Europe ,only 1211 London street Sussex gets into the table.Anything I type after the "Enter " doesnot go into the table.
I checked the field sizes in my stored procedure and they are varchar(500) .
I hope I'm posting this in the correct forum (forgive me if I'm not) since I'm not sure if this is an issue with inserting an item into a db or the processing of what I get out of it. I wrote a basic commenting system in which someone my post a comment about something written on the site. I wanted to keep it very simple, but I at least want the ability for a user to have newlines in their comment without having to hardcode a <br /> or something like that. Is there a way for me to detect a newline if someone, for example, is going to their next paragraph? Let me know if you need a better explanation. Thanks in advance!
Hi, for some AP issue, the file I upload must be without the line feed/carriage return in the last line. for example:
original fixed-length file (exported from SSIS) line NO DATA 1 AA123456 50 60 2 BB123456 30 40 3 CC123456 80 90 4 <-- with line feed/carriage return in the last line
The file format that AP request. The file only has 3 records, so it should end in the third line. line NO DATA 1 AA123456 50 60 2 BB123456 30 40 3 CC123456 80 90
Should I use script component to do it ? I am new for VB . Anyone would help me ?
I have a form and set up my datasource, bindings etc.
All works well, adding, updating, and deleting via form to sqlexpress except.....
I have 2 columns set up in sqlserver that get data from muliline textboxes on my form.
Column 1 "Material" is nvarchar(50)
Column 2 "Quantity" is int
The first multine textbox "Material" works fine, eather updating in the textbox or in the Datagridview cell.
the second multiline textbox "Quantity" works when I just put in a number in the first line of the multiline textbox, when I put in the 2nd number on the second line, nothing gets updated.
I I do that in the datagridview cell (Shift-Enter), I get an error.
"System string was not in correct format".
I tried integer.parse, but that dosn't work. I'm assuming it has something to do with the next line ascii code or something like that.
Hello,I'm a newbie and I have a little problem that's starting to work on my nerves I want to store a multi line textbox in the database, just like the way it has been entered.I used a varbinary-field.This is my code in my aspx Dim myOptions As New InterTyp.Opties() Dim myCon As SqlConnection = myOptions.getCon() Dim cmdOef As SqlCommand Dim parmOef As SqlParameter cmdOef = New SqlCommand("GetOef", myCon) cmdOef.CommandType = CommandType.StoredProcedure cmdOef.Parameters.Add("@oid", System.Data.SqlDbType.Int).Value = ID 'output parmOef = cmdOef.Parameters.Add("@otext", SqlDbType.VarChar) parmOef.Size = 8000 parmOef.Direction = ParameterDirection.Output 'execute the query myCon.Open() cmdOef.ExecuteNonQuery() txtOef.Text = cmdOef.Parameters("@otext").Value myCon.Close()In my code i call a sp:CREATE PROCEDURE dbo.GetOef @oid integer, @otext varchar OutputAS SELECT otext FROM oefening WHERE (oid = @oid) So my problem is:How do i cast the varbinary back to a text?
Is there anyway that I can have a multi-line chart title? I have even tried placing a text box over the title part of the chart that is multi-line, although this appears to work once the report is deplyed and viewed in a web browser the text box appears below the chart and the chart then has no title.
Hello,I'm trying to execute a file containing few SQL statements.CREATE VIEW test1 AS SELECT * FROM table1;CREATE VIEW test2 AS SELECT * FROM table2;The standard SQL way is to end a statement with semi-colon.But doing that,it doesn't work in SQL Server.After changing ";" to "GO", it works fine.Is there anyway we can stick to ";" to indicate the end of statement.I don't want to create scripts which works only in SQL Server.Please comment.Thanks in advance.
I have the following SQL query (SQL 2005). Its basically retrieving some values using simple joins. However there appears to be a problem with the LEFT OUTER JOIN: "LEFT OUTER JOIN DDDispatchedOrder ON (OrderLineItemTransaction.OrderLineItemTransaction ID = DDDispatchedOrder.OrderItemTransactionID) " When I try to compile the code i Get : Msg 4104, Level 16, State 1, Line 1 The multi-part identifier "OrderLineItemTransaction.OrderLineItemTransactionI D" could not be bound.
Any help would be appreciated.
Cheers Bal
SELECT ord.orderDate, cc.forename + ' ' + cc.surname person, prod.description, oli.noofitems, deladdr.housenameno + ' ' + deladdr.addressLine1 + ' ' + deladdr.addressLine2 + ' ' + deladdr.city + ' ' + deladdr.postcode + ' ' + deladdr.county + ' ' + deladdr.country deladdress FROM product prod, OrderLineItem oli, [Order] ord, OrderTransaction ordT, OrderLineItemTransaction oliT, CustomerContact cc, Customer cust, DDDispatchedOrder dd, address deladdr, address invaddr LEFT OUTER JOIN DDDispatchedOrder ON (OrderLineItemTransaction.OrderLineItemTransaction ID = DDDispatchedOrder.OrderItemTransactionID) WHERE prod.productID = oli.productID:eek: AND ord.orderID = oli.orderID AND ord.orderID = ordT.orderID AND oliT.orderlineitemID = oli.orderlineitemID AND cc.customercontactID = ord.customercontactID AND cc.customerID = cust.customerID AND ord.invoiceaddressID = invaddr.addressID AND ord.deliveryaddressID = deladdr.addressID AND ordT.dispatchTypeID = 2
Hi ALL, I need to delete 1st and last lines of text from a text file in an automated process,and save the file with the same name or a different name at the same location. How is that possible?Any help is greatly appreciated. Thanks!! Sai.
I am writing a string to a text file using the below code:
DECLARE @MyText nvarchar(500) SET @MyText = 'type This is my text >> c:MyLog.txt' exec master..xp_cmdshell @MyText
What I want to know is. how do I write multiple lines to MyLog.txt without having to call out xp_cmdshell each time I want a new line in my log? Do I use newline character in @MyText like SET @MyText = 'type This is my text line 1</n>This is line2 >> c:MyLog.txt'
I am displaying a complex formula in a column header tool tip. The formula is generated in a stored procedure. (I do not enter the tool tip text directly in the column header expression.)
Within the stored procedure, how do I generate a string that contains a carriage return/line feed?
Using ADO to conect to a text format data file to gather data. File is a .dat file, tab delimited, no header row.
Got all my ducks in a row: 1) Write a schema.ini 2) Make sure the extension is not excluded in the Jet Text registry key 3) Setup the connection properly (per MSDN Scripting help)
Works nicely, except the fist line of data is missing. File contains 78 rows of data, Jet is skipping the first line every time and reporting 77 rows.
Notes: 1) Adding a blank row, as suggested in this forum, is not an option - the data files are machine generated are not to be altered by other processes. 2) I could do it the old fashion way of importing and splitting into arrays, but this is a database function and ADO should be able to handle it.
Code samples:
Code Block
adoCON.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sPath & ";Extended Properties=""text;HDR=NO;FMT=Delimited;"";" On Error Resume Next rsSrc.Open "Select * From " & sFile, adoCON, adOpenStatic, adLockOptimistic, adCmdText sPath is a string containing the path, including the trailing sFile is a string containing the file name.
I would like a form that has 3 text boxes. These 3 boxes are going to be used for entering search criteria. The first box is for searching a field called CasePK. The second is for searching a field called LinePK and the third is for searching a field called DOS. DOS is a date field. The other two are text fields.I am using a SQLDATASOURCE and a Gridview. What will the SelectCommand look like so that I can search the 3 fields using the data from the textboxes?
Hello. I am in the process of migrating an old app to SQL Server. The old app reads hundreds of different flat file formats. One of the more complex ones is a multi-format delimited file. For example:
01^Bob Johnson^123 Main St^Anytown^St 02^Book1^$20 02^Book2^$30 03^Gift Cert^Happy Birthday^$100
This file is delimited with the ^ character. Note that the first 2 characters identify the row type. All 01 rows have data in the format: Name, Street Address, City, State. All 02 have data in the format: Book name, price. Etc.
Any clever ideas on how to parse this? I tried setting it up as a flat file source with the ^ delimiter. It doesn't work - in this example it wraps the third row to the end of the second row and keeps adding columns to fill out the row.
The only option that I can think of is to pull the entire row into one long column, and then use a script component to manually substring each column out.
I want to trim new line from string in sql server 2005...
I prepared one dtsx package and in that I want to trim new line from one of my column but i am unable to do that.
for example:
I want to retrive one column name DESCRIPTION and put that in text file but along with it I am getting blank space and new line also that I want to trim...
I have to output as one filed name, mailing address, and phone of each company that we do business with. the out put must look as follows: Company Name Store number: ##### Street Address 1 Street Address 2 City, State Zip + 4 Phone: (###) ###-####
Each piece of data is a single field and will have to be concatenated into one. How do I force the line breaks where I need them?
Also each piece of data will be compared to a €śsource€? for validity and I will need to mare the individual data pieces red where €śwrong€?. Like so: VALID MY DATA Company Name Company Name Store number: ##### Store number: ##### Street Address 1 Street Address 1 Street Address 2 Street Address 2 City, State Zip + 4 City, State Zip + 4 Phone: (###) ###-#### Phone: (###) ###-####
Any ideas on how to do this? I have used IIF for conditional formating of field colors in the past, but my expierence is that it changes the WHOLE display field not just piece of data the IIF is wrapped around.
I have a text file I need to import into a SQL Server table. Each record spans several lines. Does anyone have a vbscript routine that wil go thru this text file and put each record on one row? Once the records are one row, DTS will easily handle the import. Or is there a better way?
Sample multi-row records:
WRLDWYXCDS1 ALT101 APR04 21:30:24 6879 FAIL ALT HOST 00 0 08 00 DN 3073477171 1st CYCLE TEST TYPE CKTTST DIAGNOSTIC RESULT BIC/EBS LC TRBL:PTRN 000E S= 1 R= 0 ACTION REQUIRED Replace Card CARD TYPE 6X21AC
WRLDWYXCDS1 ALT101 APR04 22:31:37 7672 FAIL ALT HOST 00 0 08 00 DN 3073477171 1st CYCLE TEST TYPE CKTTST DIAGNOSTIC RESULT BIC/EBS LC TRBL:PTRN 000E S= 1 R= 0 ACTION REQUIRED Replace Card CARD TYPE 6X21AC
The latest similar question is almost a year old and hasn't been definitively answered. I'm designing a certificate type report where the declaration text uses static and dynamic text generated in an expression for the textbox. The problem is that there doesn't seem to be an obvious way of formating sections of the text expression with different font sizes, weights and attributes to depict the effect desired. E.g. I want one textbox to say:
This Certifies that {a field value} was blah blah blah by {another field value} etc.
Can this be done in a regular textbox? If not, are there any work-arounds to accomplish the same effect. BTW, I'm working in RS 2005 flavor with VS 2005 Report Designer.
I've Executed DBCC CHECKDB in the T-SQL in the Query Analyser, then i got results in the Grid, but i wana to store that Information Immidiatly in the Text file, useing T-SQL Script, please help any one how to write T-SQL.
i know that going into menu-Query- Results to File. i don't want to do like that.
I want to save through writing T-SQL Script
Please help any body know.... Thanks in Advance....
I am trying to write a user defined function that will allow me tostrip off the last carriage return and line feed from a text field.We have address fields stored in a text field for our ERP system andsome of them have an extra carriage return and line feed at the end ofthem. This causes havoc when we sync between our ERP system and CRMsystem. If anyone knows a way to solve this problem the help would beappreciated.Examples:Existing Text field with CR:1234 Blah Street<CR>Suite 2345<CR>Corrected Text field:1234 Blah Street<CR>Suitr 2345
Which suggests that if only one of the two multivalue parameter id is selected display the same (Parameters!ServiceAttribute.Value(0)).
This works fine when i select both the attributes but throws an exception "Index was outside the bounds of the array" when i select only one of the parameters. Can anyone help me with that?
Also i want this report parameter to allow null i.e. if a user does not select anything he should still be able to view the report. In case of regular dropdowns i have added a <Null> value to the existing values and set the default to null. But in case of multi-value, it does not give an option of adding <Null>
created a very basic flow in SSIS: extracted table data through ole db connection, added multicast and as end result i created a flat file destination (with .txt file) and a ole db destination.
My question is; how can i delete the .txt file before executing the flow again? Want to avoid that the .txt file has duplicated rows after a second execution of the flow. Is it possible to use scd component or is this way to complicated? A for each loop?
i need a similar solution for the data that will be transported through the ole db destination task....
I need the Trend line for the following data in Line chart they are the following data. The following are the graph are my output and i need the trend line for these Key_gap value.
This is the link [URL] ....
I need the same trend line for the Bar-Chart in SSRS 2005.
G'day everyoneThat's a space between the ticks.It's all part of a longer script but seeing as the failure occurs online 1if exists (select * from dbo.sysobjects where id =object_id(N'[dbo].[config]') and OBJECTPROPERTY(id, N'IsUserTable') =1)drop table [dbo].[config]GOThat's three lines only. Does it matter that they're in Unicode?Any ideas?Kind regards,Bruce M. AxtensSoftware EngineerStrapper Technologies
We have a line graph which plots the actual data points (x,y), everything is working fine with this graph. Now we need to add a trend line to this existing graph after going thro. the articles we came to know that there is no direct option in SSRS to draw a trend line. So we need to calculate the trend values ourselves which we need to plot as atrend line. This trend line is similar to the trend line which comes in Excel chart, do anyone know how to calculate the trend values from the actual data points. We got through several formulas, but were not clear, have anyone tried out exactly the same, if so please help us out by providing an example to calculate the trend values.
I have a line graph which shows positive and negative values. Is it possible to have the line one color when its negative and another when its positive?
Disaster Recovery Options based on the following criteria.
--Currently running SQL 2012 standard edition --We have 18000 databases (same schema across databases)- majority of databases are less than 2gb-- across 64 instances approximately --Recovery needs to happen within 1 hour (Not sure that this is realistic -- We are building a new data center and building dr from the ground up.
What I have looked into is:
1. Transactional Replication: Too Much Data Not viable 2. AlwaysOn Availability Groups (Need enterprise) Again too many databases and would have to upgrade all instances 3. Log Shipping is a viable option and the only one I can come up with that would work right now. Might be a management nightmare but with this many databases probably all options with be a nightmare.
More often than not, I typically don't touch DTC on clusters anymore; however on a project where the vendor states that it's required. So a couple things here.
1) Do you really need DTC per instance or one for all? 2) Should DTC be in its own resource group or within the instance's group? 2a) If in it's own resource group, how do you tie an instance to an outside resource group? tmMappingSet right?