How To Preserve A Linq Querry

May 12, 2010

If I write

[code]...

View 1 Replies


ADVERTISEMENT

Extract Some Data From A List With A Linq Querry?

Nov 15, 2010

I need to extract some data from a list with a linq querry like

(from p as MYClass1 In List where P.Datetime> UserDate1 P.Datetime< UserDate2 Select p Skip (StartPoint) Take (Range)

View 2 Replies

Querry Dataset From Xml Files?

Jun 2, 2010

I've not found any info on this again, i think i asked a while back ago and can't find it. But what I have is an application that stores data in xml files. I read these files in/out through datasets. My question is, can i filter or requerry these datatables in the datasets? and how?

View 7 Replies

Backslashes Disapearing After Querry To Mysql

Sep 22, 2011

im having some problems, when i do my query from my vb.net program to my mysql DB the data is sent, but its missing some things, let me explain.my query is pretty simple im sending a file path to my DB so that after i can have a php website get the data and make a link with the data from my DB, but when i send my data the results look like this.[code]but next time its going to be something else so i cant hard code the paths, i was looking more of a sql query switch that i might not know, since i already thaught about searching my string and if it finds a backslash it adds another one, but i feel its not a good way to script the whole thing..

View 3 Replies

Use Variable In Program's Querry Builder?

Jul 15, 2010

I've search this forum and haven't found the answer to this problem and bing new to VB 2010 [cod]e...

View 8 Replies

C# - Retrieving 2 SQL Querry From One Page To Other Using Hyperlink GridView

Aug 19, 2010

I have a code to pass the querry from a one page that has a gridview hyperlink but what i didn't know is how to retrieve it.. Here is my code

[Code]...

View 2 Replies

Display Sql Querry Result To Text Box In Program?

Aug 27, 2009

I have one text box where i display my current time now i want that current time record to be display in my second text box

View 4 Replies

Error: (missing Operator) In Querry Expressions

May 16, 2009

can somebody tell me what is wrong with my insert statement? Error: Syntex error: (missing operator) in querry expressions

Dim insertQry(1), insertString As String
insertQry(0) = "insert into activities(activities, place, days, act) values"
insertQry(1) = "('" & txtStudents.Text.ToString & "','" & lstEvent.Text.ToString & "', '" & txtNote.Text.ToString & "' '" & txtName.Text.ToString & "')"

[Code]...

View 35 Replies

Call A The Multithread Process In Order To Execute Querry In SQL Server DB?

Sep 3, 2009

I have simple ASP.net web form. With a simple click on a button i need to call a the Multithread process in order to execute my querry in SQL Server DB. I know that my querry willl take up to 45 min to be executed. While the process is running i need to display some status information like: Starting time, Time elapsed, % of completed...So after running the process i got the following error message: "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."So i have 2 problems to fix:

Avoid getting timeout while processing/calling the stored procedure. I tried to add cmd.CommandTimeout = 1000 but it didn't work out!
Display correctly Time elapsed and % Completed while processing.

Here's my code in the main form:

Imports System
Imports System.Data
Imports System.Configuration

[code]....

View 3 Replies

.net - Preserve Objects Between Wcf Calls?

Dec 13, 2010

This should be fairly basic, but say I have a Public property as local variable on my WCF service, and I set this in one call to the service. Is there a way to preserve that data for another call to the service? (Without writing the data to xml or a db, and re-referencing it or anything like that)

Executing the calls from the Winform:

Public Class ClientSideWinForm
Private proxy As ServiceReference.Client
Private Sub Client_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

[Code]....

View 2 Replies

C# - Preserve Something I Drew On A Form?

Dec 20, 2009

Basically I drew something on a form using Graphics. Now if I move a window over the form the stuff I drew gets erased.Is there a way to preserve the drawing?

View 3 Replies

Look Preserve Returns In Richtext Box?

Feb 23, 2011

I am working on a richtextbox application.When I typed text into it and hit return, the returns were preserved.However, when I opened the page up in my Microsoft Vista notepad.exe program,the returns were not preserved.The text appears as if wordwrap was unselected in my notepad.exe program.I just got one long strings and no returns.How can I fix this problem so that the returns are preserved? when I open the file back up in my richtextbox program, it appears as I had typed it with all the spacing and returns.

View 6 Replies

Preserve Columns At DataGridView?

Sep 1, 2011

I�m migrating a project from VB6 to VB.NET 2010 Express. Im replacing msflex grid with datagridview. But i�m not quite familiar with it. Im not using datasource. This will be done (far) latter.

So far i�m filling datagridview by code reading a recordset from mdb. Works fine.

The problem is that, I have defined the columns at visual studio designer mode, without using any code. When I open my mdi child form for the first time it works. But If I close this form and open it again a error occurs because it loses the defined columns.

how to preserve columns defined at design after close de form?

View 5 Replies

Preserve EOF With System.reflection?

Jun 1, 2011

Im using system.reflection to inject a managed (.net) file directly into memory.This injection works with other managed files, but this file has data in the EOF and it wont run without that data.

View 1 Replies

Asp.net - .tostring() Preserve Leading Zeros

Oct 18, 2010

Converting an object .tostring() removes the leading zeros. The object is not a fixed length, so I can't do object.tostring("0000000") where the number of zeros represents the fixed length.

An example object value is "0357" when I convert that object .tostring it becomes "357".

Is there a method for keeping the leading zeros where the length is not known?

View 4 Replies

Preserve A Collection Even After Application Exits?

Jul 23, 2009

I need to preserve a collection even after application exits. In ASP if i use application object this can be acheived. But in windows application what could i do to preserve collections?

View 4 Replies

Preserve Formatting From NumericUpDown To String?

May 15, 2012

My form contains several NumericUpDown controls. These controls show different amount of decimal places. Later in my code I put the different NumericUpDown.Value's in a string array arrStr() like so:

arrStr(1) = NumericUpDown1.Value
arrStr(2) = NumericUpDown2.Value
arrStr(3) = NumericUpDown3.Value

Then I print the array with the File.WriteAllLines function to a text file.
If for example NumericUpDown1.Value = 1.00, NumericUpDown2.Value = 2.30 and NumericUpDown3.Value = 2.124 the file has the following values in it:

1
2.3
2.124

[Code].....

I have tried Format which works, but that formatting method is not convenient as the amount of decimal places is already set for each NumericUpDown. It would be annoying to do the work again, but now with Format.

View 1 Replies

Preserve Values In ASPX Page?

Feb 21, 2011

I am trying to figure out how to preserve the values of the controls on this page (just the user-submitted commission value and the sales region (eastern is 10% and western is 20%)).[code]...

View 2 Replies

Sort Arrays And Preserve The Current Key?

May 17, 2011

I have a situation where I need to sort arrays and preserve the current key - value pairs.

For example, this array:

(0) = 4
(1) = 3
(2) = 1
(3) = 2

Needs to sort like this

(2) = 1
(3) = 2
(1) = 3
(0) = 4

Retaining the original keys. Array.Sort(myArray) sorts into the right sequence but doesn't keep the indexes. I need a variant that does.edit Using the links, this seems close to what I want. Do I just need to remove the extra brackets to convert this to vb.net?

[Code]...

View 3 Replies

VS 2010 Array With Redim Preserve?

Apr 4, 2012

[edit]Sorry I left a bad title in this thread - confusing![/edit] Been a long time since I used an array - they are so limiting...But I need to build a simple string array - that I'm passing to a C/C++ function.

Is there any other way to do this other than keep REDIM PRESERVING??

[Code]...

View 1 Replies

Asp.net - Preserve Data-structure On AJAX Postback

Dec 29, 2009

[Code]...

The first time the page loads my structrure is filled correctly. After an AJAX postback all the structure fields are setting to nothing. (It seems that the Dim OldPInfo As New PInfo is called again), but i should better ask the SO Experts.

View 1 Replies

C# - Adding A Way To Preserve A Comma In A CSV To DataTable Function?

May 17, 2010

I have a function that converts a .csv file to a datatable. One of the columns I am converting is is a field of names that have a comma in them i.e. "Doe, John" when converting the function treats this as 2 seperate fields because of the comma. I need the datatable to hold this as one field Doe, John in the datatable.

Function CSV2DataTable(ByVal filename As String, ByVal sepChar As String) As DataTable
Dim reader As System.IO.StreamReader
Dim table As New DataTable
Dim colAdded As Boolean = False

[Code]...

View 6 Replies

C# - Preserve RichText Formatting When Storing In A Database?

Aug 11, 2009

I've created a rich text box which stored the "textBox.Text" value in an SDF database. The storing works, but the formatting seems to be lost. Is this something that SDF databases can't handle? Do I need to store in binary or something? Not sure how to do that either.I'm using Visual Basic Express Edition with Winforms and writing in VisualBasic.NET btw This is how I store to the database:

Private Sub btnToolStripSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnToolStripSave.Click
Try
Me.Validate()
Me.SangerBindingSource.EndEdit()

[code]....

And this is how I insert the text in to the rich textbox

txtBoxText.SelectionFont = New Font("Verdana", 16, FontStyle.Bold)
txtBoxText.SelectionColor = System.Drawing.Color.RoyalBlue

[code]....

View 2 Replies

Class Variables - Preserve The Last Window Position

Jun 4, 2011

I have two forms that are called by the main form. One is named frmEdit, and is invoked by the ShowDialog (modal) method. The other is named frmSearch and is invoked by the Show (non modal) method. In both cases I want to preserve the last window position so each form (class) begins with Public Class frmEdit (or frmSearch):

Dim lastx as Integer = -1
Dim lasty as Integer = -1

in the Shown event handler for each form I have the code
If lastx >= 0 Then
Me.Left = lastx
Me.Top = lasty
End If

and in the FormClosing handler I do
lastx = Me.Left
lasty = Me.Top

What I don't understand is why the frmEdit (modal) form remembers its previous position but the frmSearch (non-modal) does not. frmSearch always invokes with lastx and lasty equal to -1.

View 5 Replies

Excel Does Not Preserve Datetime Format From SQL When Using QueryTables

Mar 9, 2010

I'm not sure whether this is that right place to post this, please could you advise me of where to post it if not.I have the following code in Excel 2007 VBA querying a SQL 2005 database (saves to an Excel 2003 file in the end, hence the APP):[code]This imports the required data fine, but doesn't keep the datetime formatting that is in the SQL database. If I do the same connection manually using any of the 'Data - From Other Sources' connections it keeps the datetime.I know I can format the sheet after importing the data, however there are about 50 columns on 7 sheets, all of the dates are in different places in the sheets and there are descriptive flags which I don't want to be converted to dates, so I can't just convert the whole sheet.I also am aware that if I convert the datetime to an nvarchar(10) it does keep the date in Excel, but not as datetime, just a general format.So, am I missing a simple QueryTable option that would do this for me automatically?

View 2 Replies

Forms :: ReDim Preserve Multidimensional Array?

Jun 7, 2009

with a function to redim preserve a multidimensional array (2d) and change both dimensions, also it would be a

View 3 Replies

Preserve An Array Inside A Class Method?

Mar 30, 2010

I have been learning about OOP and classes from a book and one of the question is the book has asked to create a simple Saving/Checking accounts Program. The question says that most of the functionality must be done through an Accounts Class, and this Acoounts class must inherit certain private fileds from an base class 'Transaction.

The question also says that data from the Saving/Checking accounts Program must be read to and from a text file, and these functions must be done within the Acounts class.

i have done everything the question asks to the best of my knowlegde and understanding but when it comes to storing and retieving data from the textfile i cannot utilise the array i created to store the textfile data onto it.

Bank Account.Write a program to maintain a person's Savings and Checking accounts. The program should keep track of and display the balances in both accounts, and maintain a list of transactions (deposits, withdrawals, fund transfers, and check clearings) separately for each account. The two lists of transactions should be stored in sequential files so that they will persist between program sessions.

Consider the form in Figure 11.12. The two dropdown combo boxes should each contain the items Checking and Savings. Each of the four group boxes corresponds to a type of transaction. (When Savings is selected in the Account combo box, the Check group box should disappear.) The user makes a transaction by typing data into the text boxes of a group box and pressing the button. The items appearing in the Transactions list box should correspond to the type of account that has been selected. The caption of the second label in the Transfer group box should toggle between "to Checking" and "to Savings" depending on the item selected in the "Transfer from" combo box. If a transaction cannot be carried out, a message (such as "Insufficient funds") should be displayed.

The program should use two classes, Transaction and Account. The class Transaction should have properties for transaction name, amount, date, and whether it is a credit (deposit) or debit (withdrawal/check). The class Account, which will have both a checking account and a savings account as instances, should use an array of Transaction objects. In addition, it should have properties for name (Checking or Savings) and balance. It should have methods to carry out a transaction (if possible), to display the list of transactions, and to load and retrieve the set of transactions into or from a sequential file. The events InsufficientFunds and TransactionCommitted should be triggered at appropriate times.

Hint: In order for an Account object to display a list of transactions, a list box should be passed to a method as an argument. The method might be declared with Sub EnumerateTransactions(ByVal lb As ListBox).

Here is my code. I am sorry this code is basic and unedited.

Public Class Form3
'load contents of Text file into the listbox when first loaded
'store data in file into array of accounts, record no. counts

[code]....

View 3 Replies

Read Csv File Into Dgv And Preserve Leading Zeroes.

Oct 7, 2010

I am writing out a CSV file in a VB.NET Windows Application. It is a string, like this:99,Company,00666,TBDOn another form, the user can browse to this file and open it.When he does, I use the Microsoft Jet OleDB provider and read this file into a datagridview. It displays the four columns in the grid, but it truncates the two leading zeroes on 00666 and displays 666.I need those leading zeroes. I tried writing out the string like this:99,Company,'00666,TBD(notice the leading single quote before 00666, like you would type in an Excel cell to indicate it was text), but then when the four columns are displayed in the grid, I have the single quote and the two leading zeroes. I don't want the single quote, I just thought I could use it to indicate text.So my question is how can I write out a string of leading zeroes and have them read into the grid preserved?

View 10 Replies

Use Substring With Copy-of To Preserve Inner HTML Tags?

Aug 2, 2011

I have some XML like this:[code]...

Here is the problem. I lose the <p>, <strong>, <br /> and other HTML tags inside the <story> tag whenever I take the substring. Is there any way to get the first 500 characters of the story tag while keeping the inner HTML tags?

View 2 Replies

VS 2008 Open CSV In Excel And Preserve The Leading Zero's?

Apr 27, 2011

Is there a way to open an CSV file in excel completely as text so my leading zero's don't fall away.

It needs to be done in vb.net and it neets to be opened in excel 2007 or later.

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved