sql server - Invalid Object Name from LINQ-to-SQL -


i have sql server database , have added new table:-

create table [dbo].[my_table](     [my_primary_key] [int] not null,     [my_data_value] [int] null, primary key clustered  (     [my_primary_key] asc )with (pad_index  = off, statistics_norecompute  = off, ignore_dup_key = off, allow_row_locks  = on, allow_page_locks  = on) on [primary] ) on [primary] 

i drag new table database explorer in visual web developer my_schema.dbml design window. creates me my_schema.vb file thus:-

partial class my_schemadatacontext  end class 

although trace of table appear in xml:-

<?xml version="1.0" encoding="utf-8"?><database name="my_schema" class="my_schemadatacontext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">   <connection mode="appsettings" connectionstring="data source=mypc;initial catalog=my_schema;integrated security=true" settingsobjectname="myprogram.my.mysettings" settingspropertyname="my_schemaconnectionstring" provider="system.data.sqlclient" />   <table name="dbo.my_table" member="my_tables">     <type name="my_table">       <column name="my_primary_key" type="system.int32" dbtype="int not null" isprimarykey="true" canbenull="false" />       <column name="my_data_value" type="system.int32" dbtype="int" canbenull="true" />     </type>   </table> </database> 

i try insert rows table this:-

try     db = new my_schemadatacontext("integrated security=sspi; ")     dim new_row my_table     new_row = new my_table     new_row.my_primary_key = 1     new_row.my_data_value = 1     db.my_tables.insertonsubmit(new_row)     db.submitchanges() catch ex exception     ' end try 

this results in exception invalid object name 'dbo.my_table.

presumably have jam schema name in somewhere can't see how this. tried adding initial catalogue=my_schema; connection string resulted in exception keyword not supported: initial catalogue.

has idea else try? (i should note have tried other tables in same schema same results, hope eliminate possibility of random typos causing problem.)

it looks connection string incorrect. believe catalogue should spelt @ catalog.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -