Importing File That Can Access From Another Project?

Apr 2, 2010

I am using VB.Net/ASP.Net 2008 and I have a solution with 3 projects:

1. DAL

2. BLL

3. MainWebProject

anyways because it's a Web Application Project (not a web project) I had to set it up so I could access the Profile using Imports System.Web.Profile in the MainWebProj but I can only access the profile in that project.

anyways I need to access the Profile in the DAL also, and I figure since I can import the Profile in my MainWebProj there must be a way to also import that into the sister project, DAL.

My Issue: I can import a class in Project A but not Project B. Is there import syntax so I can also import the namespace in Proj B?

View 1 Replies


Similar Messages:

Access Class File In Web Project?

Jan 29, 2010

I have a created a solution using visual studio 2008 and added a new project namely "test".

In this project i added a folder namely "code" and in this folder i added a class file "class1.vb".

But i am facinng problem when i am going to create object of that class1.vb in default.aspx.vb page

i want to access my class1.vb methods.

View 4 Replies

Visual Studio :: Cannot Access File From One Project To Another

Jan 8, 2010

i'm trying an example by trying to creating two projects in one solution to seperate logic and UI. so let's say test.logic and test.ui

in test.ui i have a page called lets say contact me. in the code behind for this page i want to call a method that belongs in a class called processData in test.logic

in contact me cs i tried something like:

namespace test.ui
{
using test.logic
//code here
}

but that does not work as class/method not shown in intellisense.

View 5 Replies

Configuration :: How To Access Database File Outside The Project Folder

Apr 12, 2010

I am trying to deploy my C# based ASP.Net 3.5 webapp

The hosting service provider said "Access 2003 (.mdb) file has to be put in 'access_db' folder in root folder"

I am currently using

OleDbConnection myConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath("~/access_db/filename.mdb"));

The folder structure is like

ParentFolder/access_db/filename.mdb
ParentFolder/ProjectFolder/<Project files> (App_Data, bin, *.aspx, web.config)

1) I am using a GridView on another page that doesn't allow to connect to a database outside the project folder. What should I do?

2) How do I modify the programmatic connection string ( shown above) ?

View 11 Replies

How To Access Resources File From A Referenced Library Project

Mar 9, 2010

I have an ASP.Net website, "MyApp", which contains the following resources files:

WebResources.resx
WebResources.es.resx

The website references a library project, "MyLib" from which I want to access those resources files. Here is the code I'm attempting:

var rm = new ResourceManager("MyApp", Assembly.GetExecutingAssembly());
subject = rm.GetString("HelloMessage"); //always string.empty

The problem is that the executing assembly is always "MyLib" instead of "MyApp". Is it possible to access the resource files embedded in the website project from a library project?

View 1 Replies

Access :: Importing DBF Files To Database?

Jan 27, 2010

I am getting the error while importing the dbf files to access database.It giving "External table is not in the expected format"

View 4 Replies

App Data - Getting Access Denied Trying To Read A File In App_Data In A Project?

Jan 24, 2010

I've an XML file stored in App_Data which is only used to read some configuration on startup. When I attempt to open it within my code, I get an Access to the path ... is denied message.

I'm having trouble understanding why, and how to solve it. I guess in theory I should alter the permissions on the file (and directory), but this hasn't changed anything.

To give a bit more background:1. Its a file bundled with the project, so the setup created by VS2008 writes it to the correct place during install. I didn't think I'd need to do anything unusual post install such that the ASP.NET application would have access.

2. When I've tried publishing this locally, I've not had any problems. - This is only on a test Windows 2003 server.

3. I've ran a simple page to understand the effective user of IIS - It is NT AUTHORITYNETWORK SERVICE. I tried granting "Full Access" to this user to this file, and still it doesn't work.The code to open it is simple:

FileStream fs = new FileStream(Server.mapPath(s), FileMode.Open);

Where s is defined as '~/App_Data/myfile.xml

I've even copied and pasted the full path & filename (from the exception) and tried "dir" on it, and it is indeed present (to get around a typo for example).I've also tried running aspnet_regiis.exe /s

View 1 Replies

SQL Server :: Importing .SQL File Into .MDF Database File Created By Visual Web Developer Express?

Dec 15, 2010

I am trying to import the SQL file provided by Elmah into my application, and I don't want to import it into the development machine I use. I want to make it a .mdf file so it can be easily transported to my host. I was wondering if there is a way to do this?

View 7 Replies

Access :: Error Importing 13 Digit Numbers Into Access2010?

Dec 9, 2010

I have a project that I have to import a text file. comma delimited values, into an Access 2010 database...I am experiencing a big problem that I have no idea how to work. I have two fields in the file that are 13 digit numbers... all my columns in the table are Text (255) yet this 13 digit number is causing the Data connection to close instantly with no data saved.When I look at the data in Excel it looks like this...4.76334E+15 in Notepad 4763341000002623 (the true and correct value).If I use Access import text tool in Append mode the table it crashes. If I use the same tool but this time tell it to create a NEW table it works.Error Msg...Microsoft Access was inanble to append all the data to the table.

The contents of fields in 0 records were deleted, and 0 records were lost due to key violations.*If data was deleted, the sata you pasted or imported doesn't amtch the field data types or the fieldSize property in the destination table.*If records were lost, either the records pasted contain primery key values that already exist in the destination table, or they violate referential integrity rules for a relationship defined between tables.Do you want to proceed anyway?Why is Access crashing and what can I do to resolve the problem?

View 3 Replies

Importing One File From Another?

Feb 24, 2011

I wanna create a ASP.NET c# file named "DBconnect.aspx" where I will provide all my MYSQL database settings. I would like to import these settings without re-entering database details to another page.

Of course have to mention the namespace with Public class but I do need to sample syntax to make this.

View 1 Replies

C# - Importing Mpp File Into SQL Server?

Nov 13, 2010

I have an assignment which is to import mpp file into database via ASP.NET (C#).

View 2 Replies

Importing Csv File - Modify Sub To Get Result?

Jan 19, 2011

I have been trying to overcome the well know issue of importing a csv file, nut ignoring the comma's within the quotes. Not every field has quotes, and not every record has comma's withing the quotes. After spending ages looking at various samples and arguments, Im still baffled. I have below a qiuck sample of a file ( we can not change the file at all ) , what i want to get out of it, and the the procedure i am currently working with. Can anyone show and explain how to modify my sub to get the desired results

"Smith, John", "125 My Street ","MY1 25Q", 135.00
"Jones,Fred","Flat 1, 139 Hight Street", "UB8 8UU",798.00

(0) Smith,John
(1) 125 My Street
(2) MY1 25Q
(3) 135.00
(0) Jones,Fred
(1) Flat 1, 139 Hight Street
(2) UB8 8UU
(3) 798.00

[Code]....

View 2 Replies

DataSource Controls :: Importing Xml File Into Sql Server (.sdf) With Mapping File (Sql Server Compact Edition)?

May 10, 2010

I have been searching for some information on how to import my xml file into a series of tables using a mapping file (schema).

View 2 Replies

DataSource Controls :: Importing Excel File AND INSERT It Into SQL?

May 19, 2010

this is me once again moving around data access. my problem now hide in the import process of an excel file that would be inserted into sql db.

the problem is the excel file may be updated or changed and i have to periodically import it and perform the process but I still cant check or compare between the two Data Source (excel, sql) as I violate the entity integrity (PK)

i found a kind of stupid approach that each time i want to import the file i will empty the table then re-insert the data, but at this step a new problem raise that other tables are !engaged! with it ... so i will violate the referential integrity (FK)

i looking for solution to compare between two sources for each tuple / row, ignore the existing one and insert the new

[Code]....

View 2 Replies

Path Error While Importing The Excel File To RadGrid?

Mar 11, 2011

i am facing the error

The Microsoft Jet database engine could not find the object 'MyDataFile$'. Make sure the object exists and that you spell its name and the path name correctly.

below is my code, i am exporting my excel sheet in HTML format. in case of importing i am facing the above mentioned error.

[code]...

View 2 Replies

Configuration :: Uploading A File For Importing Data From Excel?

Aug 27, 2010

I facing a problem when I upload a file from my side while the application is running in server.

The error shows below:

'C:Excel FilesStaff Directory1.xlsx' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

View 4 Replies

Importing CSV File Using VB - Unable To Split Line String Correctly

Jul 28, 2010

I am trying to import a csv file but unable to split the line string correctly.

DIM fields() as String = line.split(",")

Where the sample data is as below

1,"khdaf",2,"hello,world,hi","2154",5412
1,"khdaf",3,"hello,hi","2154",5412

Issue is that when i split first line it gives me array of eight(08) whereas actual columns are six (06)

View 8 Replies

DataSource Controls :: Importing A Comma Separated File And Escaping Apostrophes?

May 28, 2010

I am importing a comma seperated, single quote delimited file based off of client specifications. The only problem is now the client is sending apostophes in the file and is throwing off the single quote delimiter.

For Example:

'FirstName','LastName'
'John','O'Grady'

I need to figure out somehow to escape or replace that character before it goes into my OLE dataset import and then handle it before it hits my SQL table. Here is my current process flow:

Save the file to the App_Data using a FileUpload control Build a schema.ini for the ' delimeter Import into a dataset using Microsoft Jet OLE Use a for loop to pick out the fields that I need and build an insert into SQL I was trying to replace the ' with an underscore but then ended up replacing the whole file instead of just the one in the name.

View 3 Replies

SQL Server :: Importing Table With Access "memo" Field?

Sep 8, 2010

I imported an access database using the DTS wizard, into SQL 2005. There is a field in one of the Access tables that is a memo field, filled with a bunch of text including linebreaks.

After importing, the field is indicated as the nvarchar(MAX) datatype when I check in SQL Enterprise Manager.

The text in that field is displayed without line breaks, both in EM and when viewed on a web page.

I changed the datatype of that column to "text" and now can see line breaks when I hover over a value in that column while viewing the table data in Visual Studio 2010's Server Explorer.

But when I display the data in a ListView, there are no linebreaks. When I view my TableAdapter in my dataset, there are no linebreaks either.

View 6 Replies

Data Controls :: Importing Excel Sheet - Microsoft Jet Database Engine Cannot Open The File

Mar 26, 2016

I am trying to import excel sheet, got an error like "

The Microsoft Jet database engine cannot open the file ''.  It is already opened exclusively by another user, or you need permission to view its data"

I have given all necessary permissions but no luck..

View 1 Replies

How To Access Webservice From One Project To Another Project

May 10, 2010

i have an project with name called(dbservice layer) which is in path: d:webserviceDBService. here i have an webservice which connects to DB and returns an object of an class.

once i added an reference here i get an url:http://localhost:2371/Jobs.svc

now i have another project name (UILayer) whic is in path: E:SchoolUILayer i added an service reference here with url as http://localhost:2371/Jobs.svc but i get an messgae telling service is unable why is that happening.

if both my webserivce layer and ui layer are in same project. then i able to use the webserive in the ui layer. and get the required output

so i wanted to know is there any way we can acesss the webserive from one project to another project

View 1 Replies

How To Generate Solution And Project File From Project

Mar 4, 2010

i have the project files which consist of some folders and some aspx and aspx.vb files.

I do not have any solution file or .sproj file in it.

so I need open a single file at a time and I can not debug the whole project or any single file also.

Do I have to generate a project file or solution file,

I just wanted to open the whole project file by opening a single file in VS 2008.

so that all the folder structure and the files I can view in solution explorer.

View 1 Replies

C# - Importing A Text File Database In Sql Server Database In C#?

Jan 22, 2010

am importing a text file database in my sql server database in asp.net c#.but i cannot fetch the column name from .txt file which contains a numeric data now what to do?

View 1 Replies

Subsequent Access To File. Error - The Process Cannot Access File It Is Being Used By Another

Mar 29, 2010

I simply want to create one file and then delete it, means I want to access one file subsequently. I am getting the very familiar error as shown in title. (Process can't access the file,) I have tried using file stream and all other stuff that I found from Googling but no success so far. Does any body have small and neat solution? in short, I would like to run the following statements without any error.File.Create("C:\hsp1.txt");

File.Open("C:\hsp1.txt", FileMode.Open, FileAccess.Read, FileShare.None);

View 2 Replies

Access :: Creating An Excel File From Dataset Or Access File?

Nov 21, 2010

i have an asp.net application

c# code

i have adtabase in access and i craete adatset from it

i want to create excell file

View 2 Replies







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