Member Avatar

Here's my **formview**.. <asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1" DataKeyNames="recid"> <EditItemTemplate> RECID: <asp:TextBox ID="recid" runat="server" Text='<%# Eval("RECID") %>' ReadOnly="true" /> <br /> SHIPPER: <asp:TextBox ID="shipper" runat="server" Text='<%# Bind("SHIPPER") %>' /> <br /> <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" /> &nbsp; <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" /> </EditItemTemplate> </asp:FormView> here's my **sqldatasource1** <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT * FROM IMPORT WHERE (RECID = ?)" UpdateCommand="UPDATE IMPORT SET SHIPPER=@shipper WHERE RECID=@recid" > <SelectParameters> <asp:ControlParameter ControlID="Label1" Name="RECID" PropertyName="Text" Type="Int32" /> </SelectParameters> <UpdateParameters> <asp:Parameter Name="recid" Type="Int32" /> <asp:Parameter Name="shipper" Type="String" /> </UpdateParameters> </asp:SqlDataSource> Now, my problem is that everytime I …

Member Avatar
+0 forum 3
Member Avatar

I am attempting to add a Convert funtion to my XAML/C# application. However, the "value" object in the code below is presenting the data back as "2014-12-14", which is generating a runtime error, "Specified cast is not valid". Can anyone help me with the converstion string? I tried ParseExact, but with no success. public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { try { DateTime date = (DateTime)value; return date.ToShortDateString(); } catch (Exception ex) { return DateTimeOffset.MinValue; } }

Member Avatar
+0 forum 6
Member Avatar

So I have been working with a csv export for a few days now and I have the data almost in the form I need it in. I need some advice on how best to proceed to get to the soltuion I need. Here is the problem: My csv export contains multiple rows (over 2000) of data in this format: data1,data2,data3,data4 data1,data2,data3,data4 data1,data2,data3,data4 and I need to convert groups of three rows into one single line like this: data1,data2,data3,data4,data1,data2,data3,data4,data1,data2,data3,data4 I have researched doing this with PHP and that is my first choice and why Im posting it here, but it …

Member Avatar
+0 forum 1
Member Avatar

I am using the following [sample code](http://www.coderelic.com/2012/01/export-data-from-a-database-to-csv-excel-with-php/) to export a query to a csv file: <?php // Connect and query the database for the users $conn = new PDO("mysql:host=localhost;dbname=mydatabase", 'myuser', 'mypassword'); $sql = "SELECT username, email FROM users ORDER BY username"; $results = $conn->query($sql); // Pick a filename and destination directory for the file // Remember that the folder where you want to write the file has to be writable $filename = "/tmp/db_user_export_".time().".csv"; // Actually create the file // The w+ parameter will wipe out and overwrite any existing file with the same name $handle = fopen($filename, 'w+'); // Write …

Member Avatar
+0 forum 2
Member Avatar

I am importing data from an excel worksheet in to a sql table, one of the columns in the table is set to nvarchar(50), the data i am importing are barcodes, but the problem i am having is the column is changing the data for example the number "5900397732209" is converted to "5.9004e+012" this is only happening when the data is imported. if i save the barcode direct from my software it shows in the correct format in the table. anyone know why this is.

Member Avatar
+0 forum 4
Member Avatar

Hi this is Sukhdev, I am new in php and wish to know how to import the data from excel sheet to mysql Table; 1. I have a table with the name of city in mysql with following fields; city_id,city_name,tier_id,tier_name,state_id,state_name 2. what would be the function for uploading above fields, if I filled the data in format and click on upload, all fields can be updated in above table. Thanks, awaiting for your reply

Member Avatar
+0 forum 3
Member Avatar

Hello all, It has been long since i am facing this problem. I want to convert my datagridview data to pdf format. I have searched a lot but couldnt find any. Need your help. Regards, Ajinkya

Member Avatar
+0 forum 4
Member Avatar

Hello! I am working on updation of an old asp classic website. I have experience in Asp.net but dont know much about asp classic. I want to show my query results in xml format. I am getting data in my record set but unable to convert it into xml and also dont know how to show xml on the page. I need help in this. Regards.

Member Avatar
+0 forum 2
Member Avatar

hi, i need to subtract one date form the other and take the difference in minutes or seconds.. i'm getting the first date from the data base in 'Y-m-d H:i:s' format and second date is the current date (same format). and i want to know the difference between them in minutes and seconds. thanx!.

Member Avatar
+1 forum 4

The End.