Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : How do I add a new Employee?Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Sample Scripts Forum

 New Topic 
 
 Post Reply 
[1]  
 How do I add a new Employee? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-03-09 14:10:25
 If you need to create a new Employee, you can use a format similar to this:

INSERT INTO Employee (IsActive, FirstName, MiddleName, LastName, EmployeeAddressAddr1,
EmployeeAddressAddr2, EmployeeAddressCity, EmployeeAddressState,
EmployeeAddressPostalCode, SSN, Gender, BirthDate)
VALUES(1,'Lorraine','C','Conroy','22 Chester Street','PO Box 112',
'The Beach','CA','3155','123-45-6789','Female',{d'1953-11-07'})

Note: The Name (which will be created by combining: FirstName, MiddleName and LastName) must be unique across Customer, Employee, Vendor, and OtherName. You can query the Entity like this to verify if a name already exists.

SELECT FullName, IsActive, Type FROM Entity

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-03-09 17:46:37
Australian, New Zealand and UK users need to change the above insert statement to omit EmployeeAddressState and change both Social Security Number (SSN) to NiNumber and Gender to Sex to create a new Employee like this:

INSERT INTO Employee (IsActive, FirstName, MiddleName, LastName, EmployeeAddressAddr1,
EmployeeAddressAddr2, EmployeeAddressCity, EmployeeAddressPostalCode, NiNumber, Sex, BirthDate) VALUES(1,'Lorraine','C','Conroy','22 Chester Street','PO Box 112',
'Boronia','3155','123456','Female',{d'1953-11-07'})

Note: The Name (which will be created by combining: FirstName, MiddleName and LastName) must be unique across Customer, Employee, Vendor, and OtherName. You can query the Entity like this to verify if a name already exists.

SELECT FullName, IsActive, Type FROM Entity

You can check what Employee column names are used in your region by doing:

sp_columns employee

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-03-10 09:55:52

I have inserted a new employee successfully. The employee shows in QuickBooks, but when I do a query in the VB Demo application the employee record isn't there. What causes that to happen and how do I fix it?

This occurs when your computer's time setting has been changed or when using a QuickBooks sample file. When this happens you can resync your optimized customer table by running:-

sp_optimizefullsync employee

or you can by-pass the optimized table by doing:-

select * from employee unoptimized

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to