VS 2008 Field Testing

Nov 8, 2009

I am wanting to test for three different things. I see example of a regex thing but completely don't understand it.I found the example below that will test for alphanumeric.But I also want to be able to test for alpha only which I was able to get based off this example but I also want t be able to test for the "-" character as well.How would I change the below to test for that character as well.[code]

View 6 Replies


ADVERTISEMENT

Sql - Unit Testing The Data Access Layer - Testing Update Methods?

May 15, 2009

I'm looking into adding some unit tests for some classes in my data access layer and I'm looking at an update routine that has no return value.It simply updates a row based on the id you provide at whichever column name you provide.Inside of this method, we collect the parameters and pass them to a helper routine which calls the stored procedure to update the table.Is there a recommended approach for how to do unit testing in such a scenario?

View 4 Replies

Difference Between NUnit Testing And Unit Testing In VSTS?

Aug 25, 2009

I use VS team system 2008. At the moment i need to test some business classes, i have found two kinds testing NUnit and the unit testing provided by the VS team system. what are there differences?

View 1 Replies

.net - Unit Testing C# InternalsVisibleTo() Attribute For NET 2.0 While Testing?

May 13, 2010

I'm building an Active Directory wrapper in VBNET 2.0 (can't use later .NET) in which I have the following:

IUtilisateur
IGroupe
IUniteOrganisation

These interfaces are implemented in internal classes (Friend in VBNET), so that I want to implement a façade in order to instiate each of the interfaces with their internal classes. This will allow the architecture a better flexibility, etc.Now, I want to test these classes (Utilisateur, Groupe, UniteOrganisation) in a different project within the same solution. However, these classes are internal. I would like to be able to instantiate them without going through my façade, but only for these tests, nothing more.

[Code]...

View 1 Replies

VS 2008 Stop A Code For Testing?

Apr 5, 2012

I tried look online for a simple task but I haven't been able to find the answer. How do you stop a code for testing? I triedexit - only works for loops and if statementsstop - kinda works, but doesn't completely stopsend - the form disappears when it ends

View 4 Replies

VS 2008 Testing If An RTF File Is Empty?

Aug 29, 2010

When listbox is added to by the user a number of empty RTF files are created and saved with a string variable SavePath1,SavePath2 and SavePath3. The user can then add date to 3RichText boxes and save the data. The data can then be cleared from the RichText boxes, anotheraddition to the listbox and fill the RTB and save. I need to trap the RTBs being filled and the clear button being pressed before the data is saved. To do this I need to test for empty files and tell the user the data has not yet been saved.

View 1 Replies

VS 2008 Testing Internet Connection?

Apr 29, 2009

I am using this code to test for an internet connection. As my application will have to login to a web server. However, if the user internet connection was to fail or cable pulled out. I will have to notify the user.

Ping www.google.com to check if the user has a internet connection.Public Function PingTest() As Boolean Dim ping As New Ping()Dim pingStatus As PingReply = ping.Send(IPAddress.Parse("208.69.34.231"))

[Code]...

The only way I think I can test for an Internet connection is to ping www.google.com. So I have a used a server timer which I have set for 1/2 second and in the lapsed event it will call this ping function. If the ping returns false. Then my app will take appropriate action.

Do you think using google as a way to test an Internet connect is a good thing. If google was to fail, then my app would not function. Is polling 1/2 second to much or too little? Just wondering about my whole idea if it is good or not?

View 5 Replies

VS 2008 Testing Key Presses In Succession

May 29, 2010

I need to determine if a set of keys have been pressed in succession. For example, if I'm looking for this combination: Up, Up, Left, Space, then any key that inteferes with the order would start it over.

I tried doing a basic test to see if it would be as straight forward as I was hoping:

VB.NET

Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.KeyCode = Keys.Up Then

[Code]....

For some reason, it doesn't let me continue the sequence. I put a MessageBox on the second "Up" and it triggered when I pressed it just once.

View 4 Replies

Unit Testing Framework Timeouts In VB 2008?

Feb 19, 2009

I'm running some unit tests for a large VB.Net application I help maintain and am running into problems with tests timing out. The test run is set up so that there's no timeout limit on the overall test run, but a limit of 2 minutes per individual test. However, a couple of the tests take a lot longer than this to run, so we tried adding the timeout attribute to the test's declaration, i.e

<TestMethod(), Timeout(15 * 60 * 1000)> Public Sub DoSomething()

for a 15 minute timeout. However, the 2 minute timeout set in the test run properties seems to be taking precedence, even though it says that the timeout attribute should override it.

View 1 Replies

VS 2008 Connect Database Field To Database Field?

Feb 16, 2011

I created a local Database in VB2008 with 4 tables, the problem is that I have a textbox in one table and a combobox in other table and I want that the information that I put in textbox appear after in combobox from the other table... that's possible?

Table: Filmes ... Field: NomeTextBox
Table: Tempo de Aluguer ... Field: Nome_FilmeComboBox

View 10 Replies

VS 2008 : Testing To See If One Event Is Occurring From Another Event?

Apr 3, 2010

Say you've got a form, Form1, and you're in the Paint event. Is there a way to test to see if, say, the Resize event is occurring from within the Paint event?

View 9 Replies

Display A MSSQL 2008 Database Field / S On A VB 2008 TextB?

Jul 20, 2010

How can I display column contents of a MS SQL Database on Text Box using VB 2008

View 2 Replies

Check If A Field In A Data Table Is Null Before Creating A Textbox Bound To That Field?

Feb 24, 2010

I am building a data based application using VB 2008 an SQL Express. I need to create textboxes on my form using code, (With & End With) method. I need a simple code string that will allow the app to check if the field to wich the textbox wil be databound is Nul, If so the textbox will not be created.

View 8 Replies

Make Gridview Checkbox Field Update Boolean Field In Database?

Feb 7, 2011

There are lots of questions about this but I've not been able to solve my problem using the answers to any of them (after many, many attempts..)

I'm working in vb.net creating an asp.net web application. I have an SqlDataSource and a GridView on my page.

I want to change the DoNotMail boolean value represented by a Gridview checkbox and automatically update in the database if the checkbox is checked from 0 (False, Will Mail) to 1 (True, Won't Mail) here is the code I used. [code]...

is it possible to do a two way sync on the entire gridview when the user hits a button so you don't have to do an update every time a row is changed? because the user might check the box and then check another box then uncheck a box and it would be a lot of updates...

View 3 Replies

Make Database Field A DateTime Field Currently Is Set To String?

Oct 5, 2010

Dim query as String = "Select * from openquery (devbook, 'SELECT wb.arrival_time FROM web_bookings wb ')"All I need is to convert my arrival_time into a datetime field in the query

View 1 Replies

Rename Field Headings And Change The Field Type?

Jun 28, 2010

I am trying to edit a dbf table. I would like to be able to rename field headings and change the field type, ie string or dbl, and the size of the field. is this possible to do with vb.net. I have connected to the dbf file but after that am lost on what to do.

View 3 Replies

VS 2008 : Update Field To Add A New Value?

Feb 11, 2011

I am accepting the amount value from the user. The amount would be added to the fees if the fee is in areas, if the fee is 0, then the amount update the fee field. but when the code below is run , only the amount is updated without adding to the arrears which is the fees. Wat is wrong with this command?

update Student_Info set Fees = (Fees + '" & Me.txtamount.Text & "' ) where Class = '" & Me.cbxClass.Text & "'"

would the decode command workd in vb.net

View 1 Replies

VS 2008 Add New Row In Database / Get -1 For ID Field

Aug 4, 2009

The table has an AppID column which just increments 1 every time a new appointment is added. That works fine. It also has an ID column that gets a unique doctor ID assigned to it so the program knows which doctor has which patient.Now, when I try to add a new row, no matter what I try, the ID field gets a -1. I've tried assigning it the doctor's ID that I'm currently browsing as well as hard coding it to be a "3" and it still shows as -1. So this means that while it does save and update the new row, it adds that -1 in the ID column and thus the program can't tell which doctor has it so it won't show in my program.[code]I'm only trying to get the ID column populated, the rest should be fine as they're all from textboxes.

View 8 Replies

VS 2008 Add Or Update A Field?

Dec 23, 2010

I have a database in access and have connected it to vb, its connected to a login system the only problem that comes up is when i want to add or update a field which then "da.Update(ds)" gives an error.

Update
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Dim cb As New OleDb.OleDbCommandBuilder(da)

[Code].....

View 28 Replies

Store Pdf Into Image Field Of Sql 2008?

May 16, 2009

I want to store .pdf into image field of sql 2008

and display the same in vb.net without using adobe pdf reader

View 1 Replies

VS 2008 Put Null Value In A Field Number

May 15, 2009

I have in my DB a few number fields, but I would like put null values or empty values in some of this fields...

I had try this but without results:

If valorcolocardebito = 0 Then
valorcolocardebito = Nothing
End If

[Code].....

View 3 Replies

VS 2008 Search A Text Field?

Apr 29, 2010

In my SQL Service I have a customer name in these formats

Lastname FirstName
Lastname/FirstName
FirstName LastName
FirstName/LastName

It just depends how a user enters it in.

HOw can I search for LastName/FirstName if a users enters a search string of FirstName LastName??

View 4 Replies

Add A Blank Value In A Field In Access Database By Vb 2008?

Aug 13, 2011

I want to add a blank value to a field in access database with vb 2008 command.

Problem 1: Here is my code, it shows conversion to string not possible errors

Private Sub btnRedThrow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRedThrow.Click
Dim dbCnct As New DBUtills

[Code]....

notice the fifth and last value is empty. But it is not being added into the database, how do I do that?

Problem 2: Why does an additional field from my access database disappear even after I manually created the field?? (access database 2003 version, extension is .mdb) I'm using visual studio 2008

View 1 Replies

Detecting Zerofill In MySQL Field With VS 2008?

Jul 27, 2011

Using .NET connector: [URL] A field is set in MySQL as:

decimal(6) zerofill not null

How can the "zerofill" flag be detected in VB?

View 1 Replies

VB 2008 Numeric Field Binding To MS Access?

Dec 15, 2009

I am having a problem with something seemingly basic and typical. However, I have tried and searched for many hours, I could not find a solution. I am using Visual Basic in Visual Studio 2008. I tried to bind a textbox to a numeric field in an MS Access table. When I enter an number to the textbox, sometimes it would be converted to another number when I tab out of the textbox. For example, if I type '123456.78', it would be automatically changed to '123456.781', '123456789' would be changed to '123456792'. The wrong numbers are stored in the database too. For smaller number, it seems to be OK. For example, '1234.56' is O

View 7 Replies

VS 2008 : Enter Character In A Field And In Parameter?

Aug 17, 2009

I'm connection to a sql server 2005 database. I have a field called MapName which contains the following name for example:

SAMWON TEXTILE CO LTD
NO NOT USE

Notice the field contains an enter character.Now in my vb code I have the following

Dim SupplierCommand As New SqlCommand("SELECT OurID FROM [Mapping] WHERE (MapName=@SupplierName) AND (OrgId=" & CustomerId & ") AND (Active=1);", con)
SupplierCommand.Parameters.AddWithValue("@SupplierName", f_supplier)
'con.Open()

[code]....

where the @SupplierName parameter would be:

SAMWON TEXTILE CO LTD
NO NOT USE

exactly the same as my database field.But for some reason this query fails because of the enter characters.

View 22 Replies

VS 2008 Autofill A Flash Text Field?

Jun 20, 2009

I am making a wrapper program for this game called VFK. It is written in flash. I am trying to make an auto-text feature, but i cant code it, because i dont know how to auto-fill a flash text field.

View 3 Replies

VS 2008 Comparing Combobox To Database Field

Jan 30, 2011

I have a combobox that displays saved names from the fullname column of my database. This works fine, all the items under the fullname column are added to the combobox. However, I also have several textboxes on the same form that also need to display data from the database, from the same record. So I was wondering if this was possible:

[Code]...

View 1 Replies

VS 2008 Enter Character In A Field And In Parameter?

Mar 31, 2009

I'm connection to a sql server 2005 database. I have a field called MapName which contains the following name for example:SAMWON TEXTILE CO LTDNO NOT USENotice the field contains an enter character.Now in my vb code I have the following

Dim SupplierCommand As New SqlCommand("SELECT OurID FROM [Mapping] WHERE (MapName=@SupplierName) AND (OrgId=" & CustomerId & ") AND (Active=1);", con)
SupplierCommand.Parameters.AddWithValue("@SupplierName", f_supplier)

[code].....

View 3 Replies

VS 2008 Entering Text Into A Webbrowser Field

Mar 26, 2010

I want to make it so I have a form and a button and a web browser. The web browser will automatically load to a website that has boxes to fill in. In google chrome when i right click on the text box i can find the element or whatever its called. I am just wondering how I can make it so when I press the button it will change the text of the textbox on the website to whatever I want. Also how to make it press a button on a web browser as well.

View 11 Replies







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