473,434 Members | 1,402 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

invalid object name

5
Hiii

I have created a database named db2

after that i created 4 tables -
1.Friends and used insert,select etc commands

2 then product_master and used insert,select ,uodate etc commands
similarly employees table and t4 table

my problem is that after inserting the records in the last table t4 when i accessed the table Friends there is an error


Msg 208, Level 16, State 1, Line 1
Invalid object name 't4'.

what to do????

help
May 11 '10 #1
7 4192
jkmyoung
2,057 Expert 2GB
How are you trying to access this table? Can you access the other tables, or is t4 the only problem table?
May 11 '10 #2
ng1426
5
its like if i m using the query select * from employees m getting the result bt on the other hand if m using select * from t4 m getting this error
May 13 '10 #3
ng1426
5
only prblm is with t4 table
May 13 '10 #4
jkmyoung
2,057 Expert 2GB
Please show the code where you're creating the table. Are you getting confirmation that the table is actually created?
May 13 '10 #5
ng1426
5
create table Product_table(p_group varchar(20),name varchar(20),selling_price varchar(20))
insert into Product_table values('4','Britania','60')
insert into product_table values('1','head and shoulder','149')
insert into product_table values('1','Kissan','92')
select * from product_table
select * into product from product_table where 1=2
select * from product
alter table product alter column selling_price int
select * from product
insert into product (p_group,name,selling_price) select p_group,name,selling_price from product_table where p_group=1
update product set selling_price='selling_price+(5/100*selling_price)' where p_group=1
and the error is
Msg 245, Level 16, State 1, Line 1
Conversion failed when converting the varchar value 'selling_price+(5/100*selling_price)' to data type int.


how to resolve it

help?
May 15 '10 #6
ng1426
5
jkmyoung thanx for replying...dat prblm has been solved..

now m facing another prblm.i have pasted it please go through it...
May 15 '10 #7
jkmyoung
2,057 Expert 2GB
Use Cast or convert the varchar to an int, eg similar examples:
Expand|Select|Wrap|Line Numbers
  1. SELECT CAST(YourVarchar AS INT) FROM Product_Table
  2. SELECT CONVERT(INT, YourVarchar) FROM Product_Table
  3.  
May 17 '10 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: rockie12 | last post by:
I have a db that has a table x in it called data1 I have a program that does to things, updates values in the data1 table and also inserts new rows into this table. The update existing values...
10
by: FreeOperator | last post by:
Dear all, On Win2000 server with SP3, I am trying to access a SQL Server 7.0 database, "TestDB", from VB6 via a SQL Server ODBC system DSN using ADO 2.7. In SQL Server Enterprise Manager, there...
1
by: Frank Py | last post by:
I'm getting the following error when trying an example app: Invalid object name 'Products'. Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'Products'. Line 22:...
3
by: Mr.KisS | last post by:
Hello all, I'm working with : WinXP PRO SP1, MS SQL 2005 Express, Visual Web Dev 2005 Express. I have an aspx page which must execute a stored procedure : ______________ try {...
2
by: Jerry Nelson | last post by:
I get the following error: WGA_Update is a view not a Table Invalid object name 'WGA_Update'. Description: An unhandled exception occurred during the execution of the current web request....
2
by: Adrien Reboisson | last post by:
I'm trying to build a basic DB explorer using C# & Visual Studio 2005. I installed SQL Server 2005 Express, created a blank project, dropped a TreeView, a ListView and a DataGridView : DB objects...
3
by: ianforgroupuse | last post by:
I'm running Vista Business edition on 2005 Virtual PC. Installed SQL Server 2005 Express latest download, with instance of MSSQLSERVER and service accounts running under "NT AUTHORITY\SYSTEM"....
1
by: moni | last post by:
Hi, I am using a table named PersonInfo in my database monisha in the SQL server. I need to use this in a .aspx file , but its giving me the error of invalid object name. <asp:SqlDataSource...
4
by: Curious | last post by:
I got an exception when executing the SQL statement in my code below. The error is "Invalid object name 'db_dynamic_trading.dbo.TrdRpt_broker_list'". I know for a fact that...
8
by: dougancil | last post by:
I have the following query: insert into msbtotal.dbo.newclients SELECT distinct tcms_members.dbo.memberdata2.* FROM tcms_members.dbo.memberdata2 left outer join msbtotal.dbo.memberdata on...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.