My source data come from Pervasive SQL and returned in Excel (as external data query). I test the code in PCC.
My tables contains a file path and file name and when concatenated together I get a sting value. I want to cast this string as a hyperlink value so that I don't have to convert it in Excel.
Select path + file as link from file_source
There is no hyperlink data type in SQL Server. You need to use a VARCHAR i.e. VARCHAR(100) to store the link and then get the application or excel to display it as a hyperlink.
See:
How to change field type to hyperlink in SQL
Related
I have a mail merge datasource which is in htm/html format and it contains 70 fields. Since there is a limitation of 62 fields for such datasources(Reference).
Is it safe to change the datasource type to OLE DB database file in the confirm datasource dialog when selecting the datasource?
When you choose the "All web pages" type (and this is the default type in the case of an HTML file), you are in essence choosing a Word internal file converter to retrieve your data. The reason you end up with the concatenated columns is because
The internal converter is not primarily designed to "read data sources". It's there to convert a document in HTML format into a document in Word format.
Your HTML file contains a table in HTML format, so naturally, the converter tries to convert that into a Word table
However, Word tables can only have 63 columns, whereas HTML tables can have more, so the converter has to deal with that somehow. In this case, it concatenates the column data so column 63 ends up containing all the remaining data in the row.
Once the document is converted, Word uses the converted document as the data source. It's really no different from the situation where it uses a Word document as the data source.
If your HTML file actually contained (say) 1 paragraph of 70 comma-delimited values for each row of data, rather than an HTML table row with td cells, Word would end up treating the data as 70 separate columns (but it would also probably ask for the column delimiter every time you used the file, and you would have to ensure that commas in the data were correctly quoted.
In general, when you choose the "OLE DB Database Files" option, Word either knows of an OLE DB Provider type that can read the specified type of file, or it won't be able to read the file. In this case, what it tries to do is read the file using the Jet OLE DB provider (or in recent versions of Word, the ACE OLE DB provider).
The Jet/ACE providers are one of the mechanisms used to read Access .mdb/.accdb data, but these providers can read a number of formats such as Excel workbook data and plain text file data, using a number of what Jet/ACE calls "Installable ISAMs (IISAMs).
Since there is an IISAM for HTML format data, Word will try to get the data using that IISAM.
In that case, as long as the IISAM can actually read the HTML (it may not be able to read more modern versions of HTML very well) it works much more like the case where Word gets data from Excel. For example, if your HTML file contained two tables, you may get to choose which table to read, cf. an Excel workbook with multiple worksheets and perhaps named ranges.
Jet/ACE IISAMs generally do not support more than 255 columns. 70 shhould be fine. However, you may need to verify what the HTML IISAM does about
Columns with mixed data types (for example where some rows have numbers in them and others have text). When the Excel IISAM finds such data in the first 8 rows (by default) it tries to choose a format - somtimes that can mean that cells with text are read as if they contained "0". FWIW I do not think the HTML IISAM does that, but I would check anyway.
Columns with large amount of text, particularly if there is more than one such column. The IISAM is quite likely to truncate such columns to 255 characters or even less.
Columns with non-ANSI data (non-ANSI Unicode text e.g. Arabic, Hindi or Chinese text.
Other than delimited text files which will let you go over theat 255 limit if they are read by the internal converter, the only data source I know that will let WOrd see thousands of columns is SQL Server. Other servers with OLE DB providers such as MySQL might allow that too. If you have to use a very large number of columns, be aware that you may not see all the available field names in the relevant dropdowns in WOrd, but you should be able to insert the MERGEFIELD codes in manually in the usual way.
What is your current mailmerge connection method (OLEDB, DDE)? By switching to the OLEDB connection method - which is Word's default - you would not be changing the datasource type (only the connection method). Whether doing so will work with your datasource can easily be established by changing to OLEDB and leaving the datasource type alone. If it doesn't work, close the document without saving (or revert to the current connection method.
Regardless, the screen you're showing allows you to specify a datasource type, not the connection method. HTML files are not OLE DB database files and you'd be unlikely to find your datasource if you switched to that file type.
In any event, the 62-field limitation most likely only relates to the fields you can see via the GUI. If you know the field name, you can insert its reference via the keyboard. To do so, simply press Ctrl-F9 to create a pair of field braces (i.e. { }) and fill in between them with 'MERGEFIELD' and the field name, thus { MERGEFIELD FieldName }.
I have a dataset based on a csv file. This exposes a data as follows:
Name,Age
John,23
I have an Azure SQL Server instance with a table named: [People]
This has columns
Name, Age
I am using the Copy Data task activity and trying to copy data from the csv data set into the azure table.
There is no option to indicate the table name as a source. Instead I have a space to input a Stored Procedure name?
How does this work? Where do I put the target table name in the image below?
You should DEFINITELY have a table name to write to. If you don't have a table, something is wrong with your setup. Anyway, make sure you have a table to write to; make sure the field names in your table match the fields in the CSV file. Then, follow the steps outlined in the description below. There are several steps to click through, but all are pretty intuitive, so just follow the instructions step by step and you should be fine.
http://normalian.hatenablog.com/entry/2017/09/04/233320
You can add records into the SQL Database table directly without stored procedures, by configuring the table value on the Sink Dataset rather than the Copy Activity which is what is happening.
Have a look at the below screenshot which shows the Table field within my dataset.
I am new to Azure Mobile services. I noticed that whenever I used Azure online tools(in manage.windowsazure.com) to create a new column name for a table, it always turns my uppercase column name into lowercase. (for eample: I typed FullName for a column name, but it became fullname).
Now, if I used angular-azure-mobile-service to query data, it returns "fullname" in JSON format. Such as {'fullname': 'ABC Inc'}.
Is there anyway I can have the Json return be formatted as {'FullName':..} instead?
The column names for Azure Mobile Services are case insensitive, so we transform them to ensure there is no confusion. This should be completely separate from display issues. If you are worried about display, wrap the JSON in another object that transforms it appropriately.
I am using a Data entry continuous form to input data into a table named 'Order_History'. All fields successfully input their data into that table except for one. I have a text box that uses DLookUp to get the value from a combo box on that form and use it to select data in hopes of entering it into the table. The DLookUp is getting the data from a different table named 'Postcodes'. I assume that the reason the others work is because the control source is linked to columns in the table.
Is there a way I can link this text box (Drop_Number) to the specific column in my Order_History table while still using DLookUp to get the values?
My DLookUp code:
=DLookup("Drop_Number", "Postcodes", "Postcode = [Forms]![Order_Form]![Postcode_cb]")
I am trying to create a crystal report, but I want the connection string that I have mentioned in the Web.Config file to be accessed. Also, I want to create an xsd file for my crystal report file to refer. Can someone please direct me to a tutorial or forum to solve my problem?
Thank you all for helping me out.
I am now able to display data in the crystal report file using the XSD file.
The xsd file has fields which are exactly the same name as mentioned in the select query that is bringing values from DB.
The following is the part of the xsd file that contains the field names in the xs:element tag.
The datatypes of these fields , also needs to be mentioned. The XSD file name can be kept as desired.
The name "Summary_Report_on_portal" and "Summary_Updt" does not correspond to any dataset name in code behind or query fields. It can be kept as per the user's wish.
This XSD file needs to be referred into the crystal report, using the Database Expert in the Field Explorer window. The "Summary_Updt" name is visible in the new connections , which can be added to the crystal report.
The fields mentioned in the xs:element field are visible for the user to drag and drop into the crystal report.
When the user mentions the data source to the crystal report(dataset), the fields in the dataset are matched with the XSD field values.
CODE:
objBL.Rpt.SetDataSource(objBL.ds_shipment_info.Tables[0]);
Hope this is detailed enough. Let me know if anyone wants more info
you can also programatically set the report data source if you need to - I can provide details if you require
between calling myReportDocument.Load("myreport.rpt") and myReportDocument.Refresh() (the latter of which actually gets the data from the database) it is possible to add a call to myReportDocument.SetDataSource(myDataSource) which takes an object of data source type, which you can create, with a call to its constructors, with the URL of the data source you wish to use, its username and password.
Hope this helps
a different way would be to call ReportDocument::SetDatabaseLogon (String * user, String * password, String * server, String * database); before Refresh(); if you don't want to reuse a connection. This has the benefit of being simple but means that you dont reuse data sources.