Hi,
I have a C# web application in ASP.Net, which has a user contact info DB in
MS Access. Can I add a column to each user to save pdf attachments for each
user if needed? If so, how do we do this?
Thanks for help.
-Dale 4 3077
Dale,
I don't think that you want to dynamically add a new column for every
user. Rather, you should have a table which has a user name, and a blob
field (binary, varbinary) which you can then store the bytes of the file in.
This is accompished easily through the appropriate data adapter, which will
more than likely represent the column as a byte array in the data set.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"dale zhang" <da*******@disc ussions.microso ft.com> wrote in message
news:C3******** *************** ***********@mic rosoft.com... Hi,
I have a C# web application in ASP.Net, which has a user contact info DB in MS Access. Can I add a column to each user to save pdf attachments for each user if needed? If so, how do we do this?
Thanks for help.
-Dale
Nicholas,
Sure, I would have a static column dedicated for this. In MS Access, a blob
field means an OLE object? Is there any example and info about this?
Thanks. -Dale
"Nicholas Paldino [.NET/C# MVP]" wrote: Dale,
I don't think that you want to dynamically add a new column for every user. Rather, you should have a table which has a user name, and a blob field (binary, varbinary) which you can then store the bytes of the file in. This is accompished easily through the appropriate data adapter, which will more than likely represent the column as a byte array in the data set.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"dale zhang" <da*******@disc ussions.microso ft.com> wrote in message news:C3******** *************** ***********@mic rosoft.com... Hi,
I have a C# web application in ASP.Net, which has a user contact info DB in MS Access. Can I add a column to each user to save pdf attachments for each user if needed? If so, how do we do this?
Thanks for help.
-Dale
Dale,
Yes, an OLE object field is what you want.
Check out the article titled "Reading and Writing Bitmaps or BLOB Data
in ADO.NET" at (watch for line wrap): http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp
It's in VB, but you can easily change that to C#.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"dale zhang" <da*******@disc ussions.microso ft.com> wrote in message
news:13******** *************** ***********@mic rosoft.com... Nicholas,
Sure, I would have a static column dedicated for this. In MS Access, a blob field means an OLE object? Is there any example and info about this?
Thanks. -Dale
"Nicholas Paldino [.NET/C# MVP]" wrote:
Dale,
I don't think that you want to dynamically add a new column for every user. Rather, you should have a table which has a user name, and a blob field (binary, varbinary) which you can then store the bytes of the file in. This is accompished easily through the appropriate data adapter, which will more than likely represent the column as a byte array in the data set.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"dale zhang" <da*******@disc ussions.microso ft.com> wrote in message news:C3******** *************** ***********@mic rosoft.com... > Hi, > > I have a C# web application in ASP.Net, which has a user contact info > DB > in > MS Access. Can I add a column to each user to save pdf attachments for > each > user if needed? If so, how do we do this? > > Thanks for help. > > -Dale >
Nicholas,
The article is very good. When i tried to translate it to C# as below:
Image curImage = null;
string curFileName = null;
string savedImageName = "C:\\imageFromD b.BMP";
The compiler can not understand "Image" as below:
c:\inetpub\wwwr oot\passwordPro tectCSharp\admi nUserFile.aspx. cs(33): 'Image'
is an ambiguous reference
Any idea? Thanks. -Dale
"Nicholas Paldino [.NET/C# MVP]" wrote: Dale,
Yes, an OLE object field is what you want.
Check out the article titled "Reading and Writing Bitmaps or BLOB Data in ADO.NET" at (watch for line wrap):
http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp
It's in VB, but you can easily change that to C#.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"dale zhang" <da*******@disc ussions.microso ft.com> wrote in message news:13******** *************** ***********@mic rosoft.com... Nicholas,
Sure, I would have a static column dedicated for this. In MS Access, a blob field means an OLE object? Is there any example and info about this?
Thanks. -Dale
"Nicholas Paldino [.NET/C# MVP]" wrote:
Dale,
I don't think that you want to dynamically add a new column for every user. Rather, you should have a table which has a user name, and a blob field (binary, varbinary) which you can then store the bytes of the file in. This is accompished easily through the appropriate data adapter, which will more than likely represent the column as a byte array in the data set.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"dale zhang" <da*******@disc ussions.microso ft.com> wrote in message news:C3******** *************** ***********@mic rosoft.com... > Hi, > > I have a C# web application in ASP.Net, which has a user contact info > DB > in > MS Access. Can I add a column to each user to save pdf attachments for > each > user if needed? If so, how do we do this? > > Thanks for help. > > -Dale > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Steve |
last post by:
How do you programatically save files that are attached to an email to a
specified folder? It could be one file or multiple files attached to the email.
Can it be done if Outlook Express is being used or does Outlook have to be used?
Thanks for all help!
Steve
|
by: bburton |
last post by:
I'm using a form in Access which was used as a bug tracker. The users
could update the record with an attachment. (The data type of the
field that is used for attachments is the OLE Object)
I need to export these records into Rational ClearQuest. I am able to
export and import the records correctly, but not the attachments.
There is an option to import attachments in ClearQuest, but I'm not
sure how to export them from Access to being...
|
by: MW de Jager |
last post by:
I am sending an email with attachments from a dotnet ASP application. If I
send an email it works fine if the attachment is located in a folder on my
pc, which is open to all users on that PC, it usually works fine. If I try
to send something form My Documents, the file cannot be sent. Why is this?
Kind regards
MW de Jager
|
by: fish |
last post by:
Hi,
I have a VB.net application that will save attachments to a directory
on my local pc. I need to run this component on our exchange 2003
server and also save the attachments to a local DIR. When the
component is run on the exchange 2003 server a wizard gui is
automatically started which wants to install Outlook 2003. The
component is using mapi to access the default inbox.
What do i need to do to convert this component to run on...
|
by: mike11d11 |
last post by:
If someone could help me, I need to be able to send attachments from my
access database that I have created. This database runs queries then
generates a report off the queries from underlying tables and emails
the reports as HTML format in the body, I then need to have this same
process go out to my C:\ drive and pick up a couple files and add it to
the same email as attachments. If someone could please give me a
sample code that would...
| |
by: gazelle04 |
last post by:
I want to save a file for a data in a Database. I'm working on a Schools Database and I want to have a command button that says "Attachments" for a particular "School". Attachments may vary from Word documents, PDF file, Excel files or Html file.
I'm thinking of using the Common Dialog controls in Access but I still don't know how to use them. Can anyone send me the code.
|
by: sonja.chevre |
last post by:
Hello !
I'm looking for a script which allows me to read emails and attachment
from a pop server (then I'll save the email's text in a db and the
attachments on the server).
So I have found this article: http://www.phpit.net/article/read-email-php-pop3/
....
$email = $pop3->get_mail($i); // how to get the email
|
by: santosh singh |
last post by:
for mobile browser i used the following code :
Response.ContentType = "application/vnd.wap.xhtml+xml";
Response.AppendHeader("Content-Disposition","attachment; filename=SailBig.jpg");
Response.TransmitFile( Server.MapPath("~/images/sailbig.jpg") );
but this code is not able to open "Save as dialog box " on mobile Emulator Browser .Could anyone please tell me How to open "Save as dialog box " in mobile . i am using XHTML ( not WAP ) with...
|
by: kpfunf |
last post by:
When I email a report via macro or vba code, the attached report is named "Fuel Quote Report.(ext)". I have no idea how this name is used. I have three seperate macros sending three seperate reports. Each macro is named after the report, which are all named differently. The subject messages are different. Yet, in each email, the attachments are all named the same. How does Access name the attachments? I even tried different formats (rtf, snp),...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |