.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Files in table

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :ASP.Net
 

Hi.

In my web application (made with DynamicData 4.0) I want to add the ability to insert files (.doc, .xls, .png, .jpg ...) into database table (SQL SERVER Image).

That is relation one to many. What would be the best way to do that?

Let's say, that I have table FRIENDS and table FILES.

I tried the way, that I added column FRIEND_ID into FILES table and made relation to this to tables.

Then I want to use DbImage field template, which I would extend, so that it will support other files, not just images.

For files, that are not images I will show some default thumbnails (doc, xls ...).

Problem with relation that I have is, that I have to insert files with selecting FILES table and then select FRIEND.

I would like to insert Files to FRIEND from FRIEND table.

Any idea? I hope I didn't complicate to much.

Short description of what I want is: I want to add 1 or more files to friend on same page.

Thanks in advance.




View Complete Post


More Related Resource Links

Create a stored procedure that will take different files like .csv,.txt and create a table in my dat

  

Hi All,

I am new in SQL Server.Currently I am using SQL Server 2008.

I have to create a stored procedure that will take different files like .csv,.txt and create a table in my database.

At a single time i am using only one file like .csv,.txt.

Here I am generating a XML file which contains script to create table and how to map data into table.

Here we are using XML as a middle man which gives us idea about file structure and how to map data into table.

Can any one guide me how can i do this thing?

Thanks & Regards

Gaurav Jain


Create a stored procedure that will take these different files like .csv,.txt and create a table in

  

Hi All,

I am new in SQL Server.Currently I am using SQL Server 2008.

I have a lot of different files like .csv,.txt files.

I have to create a stored procedure that will take these different files and create a table in my database.

At a single time i am using only one type of file like it may be .csv or may be .txt.

I am creating a XML file which contains script of Create Table and how to map table in sql server?

Here XML is working as middle man.

Can any one guide me how can i do this things?

Thanks & Regards,

Gaurav Jain


Mapping of CSV files to sql table using execute sql task

  

I need to exctract data from multiple CSV files and store the data in SQL database table.

structure of data is not in same in CSV files. Number of columns and order of columns is different in CSV files. Same way, structure for all the destination database tables will not be the same. It will be according to the corresponding CSV file.

I am using execute sql task approach. I mean to use a foreach loop to loop through csv files and put an execute sql task inside foreach loop and make a BCP command dynamically to load data from csv file to sql server destination table. As using BCP we don't need to worry about structure of data.

But, I am seeing few issues:

Execute SQL task runs the sql query. Then, how can we create a common query to get the data from csv files.

                                         

Need to mass load dated files from .txt to sql table - what is the best way?

  

Hi

I have around 500 files which are named file_27072009.txt, file_28072009.txt, file_28072009.txt etc and I need to load them all into a table. What is the easiest way to pick up each of these files in turn and load them into the sql table?

I have access to SISS or sql server mgt studio but am not an expert in either.

Any help would be much appreciated so I am not having to manually open and merge all the files into one before loading.

Thanks so much

Kirsten


importing multiple dbf files into same table

  

Hello,

I have an old dbf program that provides me with a dbf ouptut on a daily basis. Each file is identical, but the file name is different by using the following naming convention: MMMDDYY.dbf, for example, OCT2710.dbf.

My OS is Windows Server 2008 R2 64 bit
My version of SQL is 2008 R2 64 bit
The DBF files appear to be DIII (I am able to use this type to import into an access database, one file at a time, and it creates a new file, not appending).

I have about 2 years worth of dbf files that I would like to import into a single sql table in order to be able to create some reports. What I'm looking for is a macro that will enable me to run it against a file folder and import all of the dbf files until it has imported them all. I want to do this as an append as each of the files have identical layout and so append should work fine. I have tried to do an import via 32 bit as well as 64 bit import wizard but can't seem to figure out how to do it. I have created a 32bit odbc to the folder but the sql import for both 32 bit and 64 bit won't recognize the odbc connection.

Has anyone got any ideas about how to resolve this? I did manage to find an old sql 2000 server that was able to do the import, but it was quite a manual operation.
Cheers
Leo


Leo

Using a table as formatting in RDLC files

  

I don't want to make a table that autopopulates based on DB information. I have some report parameters passed in from a C# file behind an ASPX file, and would just like to display the parameters in a tabular fashion. How would I achieve this?


Error in Uploading Files to Access 2010 Web Database Table with Data Macro

  

Hi All,

 

I've recently published an Access 2010 Web Database to the SharePoint 2010 farm in my organization and I'm having the strangest problem.

I have a table which includes an Attachment field. When trying to upload a file through the web I get the following error: "There was an error uploading your attachment to the server".

Now, this table has a "Before Change" Data Macro, which basically executes a simple LookUp of several parameters from another table and writes them back to the "master" table. When deleting this Data Macro, upload on the Web works fine.

The thing is that when working from the local Access file (connected to the SharePoint) and trying to change a field in the table, the following error is received: "The Microsoft Access database engine encountered an error whil

SSIS 2008 - Import all CSV files in folder - each target different table

  

I'm new to SSIS 2008, and I'm attempting to import a series of CSV files into a database. I want to loop over every CSV file in a specified folder and import each file into a different table that must be created on the fly (name of table should be base name of file, i.e. with path and extension stripped off). The file structures are similar, but not identical, so the single target table solution won't work.

Using an example I found here:

http://microsoft-ssis.blogspot.com/2011/02/how-to-configure-foreach-loop-file.html

I'm able to successfully load all files into ONE table, but I need to load each file into a separate table. Can anyone provide some assistance on exactly how to modify the project to allow for a table to be created, on the fly, for each source file?

thanks,

Mark

 


Clean Web.Config Files (VS 2010 and .NET 4.0 Series)

  
.NET 4 includes a new version of the CLR, and a new .NET 4 specific machine.config file (which is installed side-by-side with the one used by .NET 2, .NET 3 and .NET 3.5).

The new .NET 4 machine.config file now automatically registers all of the ASP.NET tag sections, handlers and modules that we've added over the years, including the functionality for:

.ASP.NET AJAX
.ASP.NET Dynamic Data
.ASP.NET Routing (which can now be used for both ASP.NET WebForms and ASP.NET MVC)
.ASP.NET Chart Control (which now ships built-into ASP.NET V4)
What this means is that when you create a new "Empty ASP.NET application" project in VS 2010, you'll find that the new default application-level web.config file is now clean and simple:

Export Visio Database Table Names to Excel

  
If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

Insert value using Table Value Functions

  
a real gem in Sql Server 2008. mostly people still using Stored procedure may be they shifted to SQL Server but they are not using TVF right now.

Using jQuery to Filter Table Rows

  
The project is using the .net GridView control, so I had limited control over the output HTML code. Still, I think this code can work for most tables. One thing to notice: you should use the class "filterable" on your table or on one of its parents for the code to work.
First, we need a text box:

RadioButton Groups, Table Rows And NamingContainers in asp.net

  
The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

RadioButton Groups, Table Rows And NamingContainers

  
(In which AJAX-enhanced CheckBoxes become more useful than RadioButtons but inheritance saves the day, and a simple RadioButton-derived control establishes the purpose of a control's naming container)

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

Building a 3-Tier App with Silverlight 3, .NET RIA Services, and Azure Table Storage

  
Silverlight 3, .NET RIA Services, and Windows Azure Services Platform makes a 3-tier Cloud application easier to build: Silverlight 3 as presentation tier, .NET RIA services as the business logic and data access tier, and Windows Azure Table as the data storage tier. The sample application in this article demonstrates the architecture with a simple Survey application with all these technologies working together from Windows Azure.

SharePoint document migration challenges when migrating files and folders

  
There are several challenges when migrating documents to Microsoft SharePoint. While these challenges can be overcome, they are a real pain if the migration source, content and file systems are not SharePoint friendly.

Combine, minify and compress JavaScript files to load ASP.NET pages faster

  
Websites are getting more interactive these days and most of this interactivity comes from JavaScript. People are using different JavaScript libraries and frameworks to make their websites more interactive and user friendly.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend