Run Entire Package

Feb 13, 2006

Hello,

i have a problem that i don't understand why it occurs: i have a package like this (resumed and ordered by its correspondingdata flow):

1. move data files to a path through by a file system task

2. import data of data files to a sqlserver database (each file through its own data flow). The origin of data is in files that have been moved to the path of step 1

3. execute a procedure of database (sql task) to manipulate data and finally export resume (data flow) to a new file in the path (moved by other file system task)

PROBLEM: if i execute the package task by task (one by one), it runs ok, but then when i build and run package as a whole (debug), it produces an error in the data flow such as it doesnt' find the path to take data of data flow (it doesn't find the source). Really it doesn't find source because the data files aren't in its correct path (like step 1 had failed). In summary, it looks like if the order of the task of package aren't correct when i execute the entire package, because the log doesn't thread any error about step 1 (file system task).

ERROR MESSAGE: an OLE DB error has occurred. Error code: 0x80040E37

Thanks for any help.

Gema

View 3 Replies


ADVERTISEMENT

Programmatically Developing An Entire Package..

Jun 8, 2006

Hi all,

I am trying to write a program that creates packages on the fly depending on the variables you pass. for eg. It should create connection managers on the fly specific to a certain file in the variable (eg. sample.csv). the package has a dataflow task and it has flat file source and oledb destination.The problem I am facing is the flat file source when assigned to a flat file connection manager(dynamically), it is not giving any source output columns. i.e, the value for DFSource.OutputCollection(0).OutputColumnCollection.Count is Zero. But when I use the same code and reverse the source and destination(oledb as source and flatfile as destination), it is working fine. I searched everywhere for resources on how to develop packages programmatically, but could not find any except one example on msdn. If anyone knows about this prob or any useful resources on this subject, it would be really helpful.

Thanks,

Prithvi.

View 1 Replies View Related

Preventing FTP File Missing From Failing The Entire Package

Mar 24, 2008

I created a simple SSIS package that downloads a file from an FTP server and does some processing on it. I scheduled it as a job step with the Sql Job Agent. The problem is that this file is not always available for pick up, but when it is I need it very quickly. I'm setting the schedule to look for it every minute. Anytime the file is not there, the package fails and shows up in the job history in red.

Is there any way to prevent an error in this task from registering a package failure?

View 3 Replies View Related

My DTS Package In Via Enterprise Manager Will Not Export Entire Column To A Text File

Nov 28, 2007

I have created a DTS package that pulls data from one column (varchar,600) in a table and exports it to a text file. The max length in this field is only 285 characters long, however, the end of one of the records is being truncated in the text file. Data is tab delimited in the table and is being exported that way.

Any tips would be greatly appreciated.

View 13 Replies View Related

Query Entire DB

Aug 13, 2007

I need to search all of the tables in a DB for a specific number (say, 123456). I am unsure of which tables may have this number in it. Is there a way to search an entire DB for a specific criteria?

This is what I want:

Select *
From [db]
where [column] like '%123456%'

I understand why this dosen't work (the DB doesn't have column names), but is there a way to display table names where this number exists? If I had that, then I could search the tables individually.

View 3 Replies View Related

How Can I Script An Entire Database

Jul 31, 2007

What is the best way to create a blank copy of my database? I really want some of the tables to keep the data in them, these are some of the lookup table.
I appreciate your help.

View 4 Replies View Related

How To Preserve Entire Database

Jul 12, 2005

Hi, I'm a noob who sucks at programming, and sucks even more when it comes to database.

I'm operating a small website with an SQL Server database that drives my shopping cart. I want to close this website down, but I don't want to lose all the data in the database in case I want to do something in the future.

How do you backup the entire database into a file so i might be able to import it at later times? Do I have to do this with SQL, T-SQL, or the manager?

View 3 Replies View Related

Reading The Entire Column?

Apr 11, 2007

Hi.

I have a long TEXT column and it cuts off at a certain point
in the Query Analyzer. I tried copying and pasting to notepad
but it is still half the actual string. How do i get the whole
TEXT string from a given column?

Thanks!

View 3 Replies View Related

Copy Entire DB On Same Server

Jun 3, 2004

Hi All,

Could anybody tell me how to make a copy of an entire database on the same server? The copy wizard won't allow the a copy to be made on the same server.

And I believe I won't be able to detach the database and re-attach it to a newly created database with a different name.

Thanks in advance!

View 1 Replies View Related

How To Duplicate An Entire Database

Jul 23, 2004

I have built a template database which I'm finally pleased with, however I want to periodically duplicate the design - not data into a new database. How can I duplicate a database? I was hoping to right mouse, copy, then right mouse, paste, and then be prompted for the new name but no such luck.

View 6 Replies View Related

Searching Entire Database

Mar 11, 2004

Is there any way to do a complete database search in SQL server? For instance, if I have a criteria "DBFORUMS", I would like to scan through all user tables in my database to get all records with the word "DBFORUMS" stored, just like want we are doing in "Quick Search" in dbforums site.

Any ideas?

Thanks in advance.

View 6 Replies View Related

Ltrim Entire Column

Jun 16, 2008

How do I "ltrim" an enire colum?

Thanks,

View 2 Replies View Related

Searching The Entire Database

Aug 28, 2005

Hi friends

Suppose i have a table of 100 cols and 10000 rows i want to search a particular field called 'Newyork' . I dont no what the col is ?

Can anyone tell me how can i search that



Vicky

View 2 Replies View Related

Searching An Entire Database

Dec 28, 2005

Hi, this is my first post on these forums, so please excuse me if this topic has already been covered.

I'm currently working in a power station for student vacation work placement. I need to export data from a database that gets it's data from machinery and inputs out in the plant. The machines that provide this input put it into a database, and I need to find the relevant data to export.

My problem is that, in some cases, the sample data that i'm given may be under different field names, in a completely unrelated table. I was looking for a way to search the entire database (250+ tables) for a certain string, so I can find where it is in the database, and run queries on the table it originates from. For example:

My sample data shows me that I have an object with the ID Y03A3DEA_TH1. I know this ID will occur somewhere else in the database, but i'm just not sure where.

If anyone knows of any way that I can search the entire database for specific data, either using tools in MS SQL 2000, or 3rd party apps, i would greatly appreciate their help.

Thanks a lot,
Jack Smith

View 2 Replies View Related

Add An Entire Table To Another (no Replace)

May 16, 2006

Hi! I've some data in a table, and I want to add these records to another table, but I tried yet with select ... Into ... and I lose all the data from this one. I need to ADD the data from table to table. Any suggestion?
Thx

View 3 Replies View Related

How Do You Lock An Entire Table?

Jul 23, 2005

Hi,I need to lock a table so that Inserts are prevented as well as deleted andupdates. At present I'm thinking this might do it:SELECT * FROM myTable WITH(UPLOCK)but then again I'm not sure whether this will cover the insert case.Thanks,Robin

View 5 Replies View Related

How Does One Set Read-uncommitted On The Entire DB?

Mar 1, 2006

Rather than setting by session I would like to configure the DB as readuncommitted.Thanx Advance.

View 5 Replies View Related

Copying Entire Database

Feb 4, 2008



Hi,

Is it possible to copy a database from the existing database. I mean to say creating a duplicating database.

Note: I can do it by using "Generate SQL Server Script Wizard" or "Database Publishing Wizard" which saves a some filename.sql and later executing this will create another database by assigning some xyzdatabase name.

My main motive is copying a database in a single line script without using this lengthy sciprt.

Example

FirstDatabase (contains 10 tables 10 stored procedures)
SecondDatabase (also contains 10 tables 10 stored procedures)

If possible, can you write a script that attach a database from the C:MyTemporaryDatabase

Because this i need through programming Visual Basic using SQL Server. I want to create some temporary database.


Waiting for your reply.

Thanks.


Best Regards
Kashif Chotu

View 5 Replies View Related

Sql Script Entire Database

Jan 20, 2007

Im building a site on my pc using SQLExpress and i have a question about something. The database im working on has data inside the tables and i was wondering how i would move that to a different server though a script with all the data in the table.

View 3 Replies View Related

Entire Table In A Page

Mar 13, 2008

How can I do in order that a table show all its rows in a page?And if the table can only show a number of rows cause arrive to the end of the page show the table in the next page?

Thanks!

View 5 Replies View Related

Will A Single Row Be Locked Or The Entire Table?

Feb 19, 2006

I am giving the following statement outside the begin tran block in a stored procedure:
select * from table1 with (holdlock) where column1 = @colValue
I have the following two questions regarding above situation:

Being outside the begin tran block, will the select statement cause a lock to be held or it has to be within the begin tran block for the lock to be held?
Will the select statement hold a lock only on the row or rows matching the where clause, or it may lock a page or even the entire table in this situation?
Thanks

View 3 Replies View Related

Keeping Entire Table In Memory

Aug 17, 1999

How can I instruct SQL Server to keep entire table in memory? ie the memory pages should not be swapped to HD.

View 2 Replies View Related

Migrate Entire 6.5 To New 6.5 Hardware.HELP NEEDED!!

Sep 22, 2000

I need to move everything from one 6.5 server to another. I have already installed 6.5 to the new server. (The new server has a new drive configuration) How can I move the Master Database and all other databases including sp's and logins?

Please Help ASAP!!!!

Thanks,
Jason

View 1 Replies View Related

List The Primay Key In Entire Database

Apr 1, 2004

I'm running the below query for listing all the primary key in a database but it is retiving 0 rows.

DECLARE @cmdstr varchar(100)
CREATE TABLE dbo.TempTable
(TABLE_QUALIFIER varchar(10),
TABLE_OWNER varchar(5),
Table_Name varchar(10),
COLUMN_NAME varchar(15),
KEY_SEQ int,
PK_NAME varchar(50),
)
--Create Stored Procedure String
SELECT @cmdstr = 'sp_msforeachtable ''sp_pkeys "?"'''

INSERT INTO TempTable EXEC(@cmdstr)
SELECT Table_Name,COLUMN_NAME,PK_NAME FROM TempTable ORDER BY Table_Name
DROP TABLE TempTable

Any body can give advice regarding this.
Thanks,
Ravi

View 14 Replies View Related

Move Entire SQL Server Instance

Jan 29, 2007

I have tried searching all over and have not been able to find what I need, but this is what I have pieced together.

Background:
I need to move an entire instance of SQL Server 2000 SP3 running on Windows Server 2000 to a new physical server running SQL Server 2000 SP4 running on Windows Server 2003. I guess my biggest question is how do I move system databases (master,msdb,tempdb,model), I don't particularly like the idea of using sp_detach/sp_attach on system databases?

This is what I had in mind.
-Install SP4 on the source server
-Backup source to tape
-Restore from tape to destination server (restore system dbs as re_master,re_msdb)
-Shut SQL services down on destination server.
-Replace the system dbs .mdf and .ldf with the re_master & re_msdb .mdf and .ldf
-Restart SQL services
-Restore User databases from tape.

Ultimately, I'm asking can you change the undlying .mdf & .ldf files for system databases?

Also, are there any issues going from Windows Server 2000 to Windows Server 2003?

Thanks in advance.

View 11 Replies View Related

SQL Mgmt Server: Run Selection Vs Entire Tab

May 3, 2007

Has anyone here been having issues where SQL Server Management Server will sometimes ignore selected text and run all scripts on the current tab?

This has been happening most recently after a connection times out or is forced shut. From a disconnected tab, if I add "Use Master" at the bottom of a page full of script, it will often run ALL statements starting from the first line.

I have SP2 installed which rolls management server to 9.00.2047.00 - but this has been an issue for me even before SP1 & SP2.

I can find nothing in the knowledge base regarding this, but perhaps my search string wasn't very thorough.

I'd just like to know if others are experience this issue so I can report to MS.

Thanks.

View 3 Replies View Related

How To Find And Replace In Entire Database

Nov 21, 2013

I have to replace gl_number 25050-80 with gl_number 25050-80 in the entire database. I know how to do that in a table but not in all tables.

View 2 Replies View Related

How To Create Entire Database Trigger

Apr 10, 2014

I want to replace every single 1/1/1900 date I have in my system with null, on an entire database level. I never want them, they cause multiple issues, and I need them gone.

I have made a trigger on a test table that works for inserts, but not updates:

CREATE TRIGGER UpdateDate ON test FOR INSERT AS
IF EXISTS (select * FROM inserted WHERE CheckDate ='1/1/1900')
BEGIN
UPDATE test SET CheckDate=Null
FROM test T INNER JOIN inserted I ON T.AutoID=I.AutoID
WHERE I.CheckDate='1/1/1900'
END

Also, it only works on this table, and the specific field mentioned.

I am looking for a global, databse level trigger that will replace 1/1/1900 with null whenever it appears from an insert, or an update statement.

View 5 Replies View Related

Script To Copy Entire Table

Jul 20, 2005

I'm a newbie to script writing. I'm trying to write a script to copy alldata from a table to the same table in a 2nd database. Both databases areon the same server and are identical in design. I can do this with DTS butwanted a script I could email to a user to run in Query Analyzer.Example:Copy entire table called 'Customers' in the 'Data01' database totable 'Customers' in the 'Data02' databaseI want to overwrite all data in the destination table.Thanks

View 1 Replies View Related

SQL 7: One Column's Value Is Repeated Throughout Entire Result Set

Jul 20, 2005

I'm using the following query to look in a log file and show somestatistics. It counts the total number of views and the total numberof unique users who have viewed a particular item (the "id" and"title" fields are associated with the item).SELECT title, COUNT(id) AS NumberViews, COUNT(DISTINCT UID) ASNumberUniqueUsers, Type, idFROM ActivityLogWHERE dtTime >= 'Nov 1 2004 12:00AM' AND DtTime <= 'Nov 1 200512:00AM'GROUP BY Title, Type, hdnIdORDER BY TopViewed descThis works fine on SQL Server 2000 (our development machine), but onSQL Server 7 (our production machine), the title column has the samevalue for every row. The other columns show the correct values.If I remove the "ORDER BY" clause, then it works fine. If I removethe "COUNT(DISTINCT UID)" column, it works fine. If I totally removethe WHERE clause, it works fine.Any ideas? It seems like a bug since it works fine on sql2k. I'vetried adding OPTION (MAXDOP 1) to the end of the query, but thatdidn't help.We're using SQL Server 7.0 sp1, and my boss doesn't want to riskupgrading to sp4 because it might screw up all of our otherapplications. I looked through all of the sp2 through sp4 bug fixes,and I didn't see anything specifically mentioning this.Thanks.

View 2 Replies View Related

Want To Copy One Entire Row To Same Table Using Primary Key

Mar 5, 2008



I have table in my SQL database, I want to copy(or insert) one record(one entire row using primary key, which is auto)

I am thinking something like this
Insert Into Table1 (a, b, c,d,e) values(select a,b,c,d,e from Table1 where Primarykey=1 or any number)

telll me how do I do that

maxs

View 4 Replies View Related

How To Find A Work In The Entire Database?

Mar 17, 2008



I have saved a word somewhere in somefield which i can't remember..

is there any way to search for the word in the entire datebase and show in which table and field it is stored?

View 3 Replies View Related

Fail To Read Entire Table In .NET

Sep 20, 2007

The problem that I am having is that I am not getting the results from an entire table, just a small subset. The sql command is "Select * from login", which has always implied to me, get everything, to end of table, or, until I tell you to stop. I am getting exactly, 10 items as input, and then it stops. I am including the code below in the hopes that someone can spot what it is that I am doing wrong.

The purpose of the routine is to convert a user login database into a new, expanded format.

TIA, Tom


Imports Common.Utility.Utils

Partial Class UserDatabaseConversion

Inherits System.Web.UI.Page

Dim sqlConn As SqlConnection = getSQLConnection(ConfigurationManager.AppSettings("utilityDbName"))

Dim sqlConnN As SqlConnection = getSQLConnection(ConfigurationManager.AppSettings("utilityDbName"))

Dim sqlStringOld As String = "Select * from login"

Dim sqlStringNew As String = "usp_UT_AddNewUser"

Dim buildCnt As Integer = 0

Dim oldUserCnt As Integer = 0

Dim newUserCnt As Integer = 0

Dim oLocation As String = Nothing

Dim errors As Integer = 0

Dim mesg As String = Nothing

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

getOldUsers()

End Sub

Sub getOldUsers()

Dim odate As Date = Date.Today

Dim sqlCmdOld As SqlCommand = New SqlCommand()

sqlCmdOld.CommandText = sqlStringOld

sqlCmdOld.CommandType = CommandType.Text

sqlCmdOld.Connection = sqlConn

Dim dbReader As SqlDataReader = Nothing

Try

sqlConn.Open()

dbReader = sqlCmdOld.ExecuteReader()

If dbReader.HasRows Then

Do While dbReader.Read()

oldUserCnt += 1

Select Case IsDBNull(dbReader.Item("reg_date"))

Case True

buildNewUser(dbReader.Item("name"), dbReader.Item("password"), dbReader.Item("email"), dbReader.Item("type"), dbReader.Item("org"), dbReader.Item("occupation"), dbReader.Item("location"), odate)

Case False

buildNewUser(dbReader.Item("name"), dbReader.Item("password"), dbReader.Item("email"), dbReader.Item("type"), dbReader.Item("org"), dbReader.Item("occupation"), dbReader.Item("location"), dbReader.Item("reg_date"))

End Select

Loop

End If

Catch ex As Exception

Finally

sqlConn.Dispose()

End Try

If errors = 0 Then

lblMesg.Text = "Conversion completed succesfully.<br />Users In: " & oldUserCnt & " , Users Out:" & newUserCnt

Else

lblMesg.Text = "Conversion comleted with errors.<br />Users In: " & oldUserCnt & " , Users Out:" & newUserCnt & "<br />"

lblMesg.Text += mesg

End If

End Sub

Sub buildNewUser(ByVal oname As String, ByVal opassword As String, _

ByVal oemail As String, ByVal otype As String, _

ByVal oorg As String, ByVal oocc As String, _

ByVal oloc As String, ByVal oregdate As Date)

Dim sqlCmdNew As SqlCommand = New SqlCommand()

sqlCmdNew.CommandText = sqlStringNew

sqlCmdNew.CommandType = CommandType.StoredProcedure

sqlCmdNew.Connection = sqlConnN

Dim userName As String = Nothing

Dim firstName As String = Nothing

Dim middleName As String = Nothing

Dim lastName As String = Nothing

Dim title As String = Nothing

Dim emailAddress As String = Nothing

Dim passWord As String = Nothing

Dim userType As String = Nothing

Dim org As String = Nothing

Dim occ As String = Nothing

Dim loc As String = Nothing

Dim rdate As Date = Nothing

oLocation = oloc

' user name will be the first part of the email address

emailAddress = oemail

Dim uname() As String = oemail.Split("@")

' extend the length of the user name to at least 5 characters

Select Case uname(0).Length

Case Is > 4

userName = uname(0)

Case Is = 4

userName = uname(0) & "1"

Case Is = 3

userName = uname(0) & "12"

Case Is = 2

userName = uname(0) & "123"

Case Is = 1

userName = uname(0) & "1234"

End Select

' check for suffixes

Dim suffix() As String = oname.Split(",")

Select Case suffix.Length > 1

Case True

title = suffix(1)

End Select

' split names out

Dim names() As String = suffix(0).Split(" ")

' possibly 3 components to the name

Select Case names.Length

Case Is = 1

firstName = names(0)

Case Is = 2

firstName = names(0)

lastName = names(1)

Case Is = 3

firstName = names(0)

middleName = names(1)

lastName = names(2)

End Select

' setup password. must be at least 6 characters.

' if less, extend to 6.

Select Case opassword

Case Is > 5

passWord = opassword

Case Is = 5

passWord = opassword & "1"

Case Is = 4

passWord = opassword & "12"

Case Is = 3

passWord = opassword & "123"

Case Is = 2

passWord = opassword & "1234"

Case Is = 1

passWord = opassword & "12345"

End Select

' user type, organization and occupation

userType = otype

org = oorg

occ = oocc

' registration date

Select Case IsDBNull(oregdate) Or IsNothing(oregdate)

Case True

rdate = Today.Date

Case False

rdate = oregdate

End Select



' try to extract the location

' get the country

Dim country As String = getCountry(oloc)

' get the state

Dim state As String = getState(oloc)

' only thing left is the city

Dim city() As String = oloc.Split(",")

' add parameter values

sqlCmdNew.Parameters.AddWithValue("@NamePrefix", System.DBNull.Value)

sqlCmdNew.Parameters.AddWithValue("@FirstName", replaceSingleQuote(firstName))

Select Case IsNothing(middleName)

Case True

sqlCmdNew.Parameters.AddWithValue("@MiddleName", System.DBNull.Value)

Case False

sqlCmdNew.Parameters.AddWithValue("@MiddleName", replaceSingleQuote(middleName))

End Select

Select Case IsNothing(lastName)

Case True

sqlCmdNew.Parameters.AddWithValue("@LastName", System.DBNull.Value)

Case False

sqlCmdNew.Parameters.AddWithValue("@LastName", replaceSingleQuote(lastName))

End Select

sqlCmdNew.Parameters.AddWithValue("@UserName", replaceSingleQuote(userName))

Select Case IsNothing(title)

Case True

sqlCmdNew.Parameters.AddWithValue("@NameTitle", System.DBNull.Value)

Case False

sqlCmdNew.Parameters.AddWithValue("@NameTitle", title)

End Select

sqlCmdNew.Parameters.AddWithValue("@Password", replaceSingleQuote(passWord))

sqlCmdNew.Parameters.AddWithValue("@EmailAddress", emailAddress)

sqlCmdNew.Parameters.AddWithValue("@PasswordHint", userName)

Select Case isEmpty(org)

Case True

sqlCmdNew.Parameters.AddWithValue("@Organization", System.DBNull.Value)

Case False

sqlCmdNew.Parameters.AddWithValue("@Organization", replaceSingleQuote(org))

End Select

Select Case isEmpty(occ)

Case True

sqlCmdNew.Parameters.AddWithValue("@Occupation", System.DBNull.Value)

Case False

sqlCmdNew.Parameters.AddWithValue("@Occupation", replaceSingleQuote(occ))

End Select

sqlCmdNew.Parameters.AddWithValue("@Address1", System.DBNull.Value)

sqlCmdNew.Parameters.AddWithValue("@Address2", System.DBNull.Value)

Select Case isEmpty(city(0))

Case True

sqlCmdNew.Parameters.AddWithValue("@City", System.DBNull.Value)

Case False

sqlCmdNew.Parameters.AddWithValue("@City", replaceSingleQuote(city(0)))

End Select

sqlCmdNew.Parameters.AddWithValue("@ZipCode", System.DBNull.Value)

sqlCmdNew.Parameters.AddWithValue("@PostalCode", System.DBNull.Value)

Select Case IsNothing(state)

Case True

sqlCmdNew.Parameters.AddWithValue("@State", System.DBNull.Value)

Case False

sqlCmdNew.Parameters.AddWithValue("@State", state)

End Select

sqlCmdNew.Parameters.AddWithValue("@Other", System.DBNull.Value)

Select Case IsNothing(country)

Case True

sqlCmdNew.Parameters.AddWithValue("@Country", System.DBNull.Value)

Case False

sqlCmdNew.Parameters.AddWithValue("@Country", country)

End Select

sqlCmdNew.Parameters.AddWithValue("@GeneralEmail", False)

sqlCmdNew.Parameters.AddWithValue("@FundRaiseEmail", False)

sqlCmdNew.Parameters.AddWithValue("@GeneralUSPSMail", False)

sqlCmdNew.Parameters.AddWithValue("@FundRaiseUSPSMail", False)

sqlCmdNew.Parameters.AddWithValue("@DateAdded", rdate)

sqlCmdNew.Parameters.AddWithValue("@DateUpdated", rdate)

sqlCmdNew.Parameters.AddWithValue("@Active", True)

sqlCmdNew.Parameters.AddWithValue("@UserType", userType)

Dim iRows As Integer = 0

' try to insert the row into the table

Try

sqlConnN.Open()

iRows = sqlCmdNew.ExecuteNonQuery()

If iRows <> 1 Then

errors += 1

mesg += "<br />User: " & firstName & " " & lastName & " was not added.<br />"

End If

newUserCnt += 1

Catch ex As Exception

Dim exMsg As String = ex.Message.ToString()

writeApplicationLog(exMsg, ConfigurationManager.AppSettings("UtilityDBName"))

errors += 1

mesg += "<br />User: " & firstName & " " & lastName & " was not added due to " & exMsg & "<br />"

Finally

sqlConnN.Close()

sqlCmdNew.Dispose()

End Try

End Sub

Function getState(ByVal loc As String) As String

Dim state As String = Nothing

If loc.Contains("NY") Then

state = "NY"

ElseIf loc.Contains("WA") Then

state = "WA"

ElseIf loc.Contains("PA") Then

state = "PA"

ElseIf loc.Contains("AZ") Then

state = "AZ"

ElseIf loc.Contains("MI") Then

state = "MI"

ElseIf loc.Contains("WI") Then

state = "WI"

ElseIf loc.Contains("CT") Then

state = "CT"

ElseIf loc.Contains("NC") Then

state = "NC"

ElseIf loc.Contains("CA") Then

state = "CA"

ElseIf loc.Contains("NY") Then

state = "NJ"

End If

Return state

End Function

Function getCountry(ByVal cntry As String) As String

Dim country As String = "US"

If cntry.Contains("Canada") Then

country = "CA"

End If

Return country

End Function

End Class

View 1 Replies View Related







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