S
Space Cowboy
I cant get accessdb.cs to compile. I show my
directory,program,compile. The directory came from a book zip. I
created the Northwind.dll from Northwind.cs which contains the
namespace nwind. The crux of the problem is Northwind.cs which I
assume was created from SQLMETAL which is a mapping of Northwind.mdf.
It shows Northwind takes 2 parameters. Every Internet example shows
just the connect string.
I know Im probably barking up the wrong tree. When I get past the
compile error then I assume I need to have
some SQL service running. Im hoping LINQ didnt need a SQL service
with Data Source(local).
Ill settle for a clean compile and then worry about the runtime.
Thanks,
Jim
03/29/2011 10:42 AM <DIR> .
03/29/2011 10:43 AM 230 accessdb.cs
03/29/2011 04:55 AM 143,697 Northwind.cs
03/29/2011 04:55 AM 39,935 Northwind.dbml
03/29/2011 05:37 AM 86,016 Northwind.dll
03/29/2011 04:55 AM 4,194,304 Northwind.mdf
03/29/2011 04:55 AM 41,416 Northwindmap.xml
03/29/2011 04:55 AM 1,048,576 Northwind_log.LDF
findstr /i Northwind Northwind.cs
public Northwind(string connection,
System.Data.Linq.Mapping.MappingSource mappingSource) :
public Northwind(System.Data.IDbConnection connection,
System.Data.Linq.Mapping.MappingSource mappingSource) :
type accessdb.cs
using System;
using System.Data.Linq.Mapping;
namespace nwind
{
class database
{
static void Main()
{
nwind.Northwind db = new nwind.Northwind(@"Data
Source=(local);Initial Catalog=Northwind");
}
}
}
csc /r:Northwind.dll accessdb.cs
Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.1
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.
accessdb.cs(9,28): error CS1729: 'nwind.Northwind' does not contain a
constructor that takes '1' arguments
Northwind.dll: (Location of symbol related to previous error)
directory,program,compile. The directory came from a book zip. I
created the Northwind.dll from Northwind.cs which contains the
namespace nwind. The crux of the problem is Northwind.cs which I
assume was created from SQLMETAL which is a mapping of Northwind.mdf.
It shows Northwind takes 2 parameters. Every Internet example shows
just the connect string.
I know Im probably barking up the wrong tree. When I get past the
compile error then I assume I need to have
some SQL service running. Im hoping LINQ didnt need a SQL service
with Data Source(local).
Ill settle for a clean compile and then worry about the runtime.
Thanks,
Jim
03/29/2011 10:42 AM <DIR> .
03/29/2011 10:43 AM 230 accessdb.cs
03/29/2011 04:55 AM 143,697 Northwind.cs
03/29/2011 04:55 AM 39,935 Northwind.dbml
03/29/2011 05:37 AM 86,016 Northwind.dll
03/29/2011 04:55 AM 4,194,304 Northwind.mdf
03/29/2011 04:55 AM 41,416 Northwindmap.xml
03/29/2011 04:55 AM 1,048,576 Northwind_log.LDF
findstr /i Northwind Northwind.cs
public Northwind(string connection,
System.Data.Linq.Mapping.MappingSource mappingSource) :
public Northwind(System.Data.IDbConnection connection,
System.Data.Linq.Mapping.MappingSource mappingSource) :
type accessdb.cs
using System;
using System.Data.Linq.Mapping;
namespace nwind
{
class database
{
static void Main()
{
nwind.Northwind db = new nwind.Northwind(@"Data
Source=(local);Initial Catalog=Northwind");
}
}
}
csc /r:Northwind.dll accessdb.cs
Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.1
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.
accessdb.cs(9,28): error CS1729: 'nwind.Northwind' does not contain a
constructor that takes '1' arguments
Northwind.dll: (Location of symbol related to previous error)