Showing posts with label program. Show all posts
Showing posts with label program. Show all posts

Friday, March 9, 2012

Need advice how to write a program to receive an image via email and put it into the SQL S

Hello,
I am trying to find a way to write a program to do the following:
Receive an image via email, retrieve that image and put it into a database.
Could you please give me an advice where to start or point me into the right
direction? Is there an ASP component somewhere that would do the trick?
P.S. I have my own Windows 2003 server and SQL Server 2000, and can install
anything on my server if I need to.
Thank you,
Robert ZolnarHi Vanessa
If you can send the image as an attachment xp_readmail can save this to disc
where it can then be loaded in to the database. For SQL Mail you will need a
MAPI client e.g. Outlook 2000 installed on the server. Check out
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnovba01/html/SQLServerE-mail.asp
and Books online for more. Once the image has been materialised you than
then use something like the Bii sample program to load it
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/samples/samples_2isp.asp
If you want to do away with the Email you could use upload the image file
into a location (share) that is accessable by your SQL Server see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/samples/samples_2isp.asp
This link also discusses the pros and cons of storing images in the database
John
"Vanessa Lee" <van77788@.yahoo.com> wrote in message
news:roKdnfLGWt-zymXeRVn-sw@.comcast.com...
> Hello,
> I am trying to find a way to write a program to do the following:
> Receive an image via email, retrieve that image and put it into a
> database.
> Could you please give me an advice where to start or point me into the
> right
> direction? Is there an ASP component somewhere that would do the trick?
> P.S. I have my own Windows 2003 server and SQL Server 2000, and can
> install
> anything on my server if I need to.
> Thank you,
> Robert Zolnar
>|||Hello John,
Thank you for your reply. Now that I know about MAPI as you mentioned, I
wonder if there is a way to avoid using SQL server at all and saving the
image to a file with a specific filename for a later retrieval.
Here is how I think it would work:
(1) Receive an image in email attachment.
(2) Retrieve the image from that attachment.
(3) Change the name of the image file into what was written in the Subject
of that email.
(4) Save the renamed image file into a specific folder.
(5) Delete the received email
Do you know about any other components or programs somewhere on the net
already written preferably in VBScript that it might be helpful for me to
look at?
Thank you.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:O6LWOqVNGHA.720@.TK2MSFTNGP14.phx.gbl...
> Hi Vanessa
> If you can send the image as an attachment xp_readmail can save this to
disc
> where it can then be loaded in to the database. For SQL Mail you will need
a
> MAPI client e.g. Outlook 2000 installed on the server. Check out
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnovba01/html/SQLServerE-mail.asp
> and Books online for more. Once the image has been materialised you than
> then use something like the Bii sample program to load it
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/samples/samples_2isp.asp
> If you want to do away with the Email you could use upload the image file
> into a location (share) that is accessable by your SQL Server see
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/samples/samples_2isp.asp
> This link also discusses the pros and cons of storing images in the
database
> John
>
> "Vanessa Lee" <van77788@.yahoo.com> wrote in message
> news:roKdnfLGWt-zymXeRVn-sw@.comcast.com...
> > Hello,
> >
> > I am trying to find a way to write a program to do the following:
> >
> > Receive an image via email, retrieve that image and put it into a
> > database.
> >
> > Could you please give me an advice where to start or point me into the
> > right
> > direction? Is there an ASP component somewhere that would do the trick?
> >
> > P.S. I have my own Windows 2003 server and SQL Server 2000, and can
> > install
> > anything on my server if I need to.
> >
> > Thank you,
> > Robert Zolnar
> >
> >
>|||Hi
What you are wanting to do should certainly be possible, although I have
never used it with VBScript. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/exchanchor/htms/msexchsvr_mapi.asp for the SDK although the example are mainly in C/C++
John
"Vanessa Lee" wrote:
> Hello John,
> Thank you for your reply. Now that I know about MAPI as you mentioned, I
> wonder if there is a way to avoid using SQL server at all and saving the
> image to a file with a specific filename for a later retrieval.
> Here is how I think it would work:
> (1) Receive an image in email attachment.
> (2) Retrieve the image from that attachment.
> (3) Change the name of the image file into what was written in the Subject
> of that email.
> (4) Save the renamed image file into a specific folder.
> (5) Delete the received email
> Do you know about any other components or programs somewhere on the net
> already written preferably in VBScript that it might be helpful for me to
> look at?
> Thank you.
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:O6LWOqVNGHA.720@.TK2MSFTNGP14.phx.gbl...
> > Hi Vanessa
> >
> > If you can send the image as an attachment xp_readmail can save this to
> disc
> > where it can then be loaded in to the database. For SQL Mail you will need
> a
> > MAPI client e.g. Outlook 2000 installed on the server. Check out
> >
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnovba01/html/SQLServerE-mail.asp
> > and Books online for more. Once the image has been materialised you than
> > then use something like the Bii sample program to load it
> >
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/samples/samples_2isp.asp
> >
> > If you want to do away with the Email you could use upload the image file
> > into a location (share) that is accessable by your SQL Server see
> >
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/samples/samples_2isp.asp
> > This link also discusses the pros and cons of storing images in the
> database
> >
> > John
> >
> >
> > "Vanessa Lee" <van77788@.yahoo.com> wrote in message
> > news:roKdnfLGWt-zymXeRVn-sw@.comcast.com...
> > > Hello,
> > >
> > > I am trying to find a way to write a program to do the following:
> > >
> > > Receive an image via email, retrieve that image and put it into a
> > > database.
> > >
> > > Could you please give me an advice where to start or point me into the
> > > right
> > > direction? Is there an ASP component somewhere that would do the trick?
> > >
> > > P.S. I have my own Windows 2003 server and SQL Server 2000, and can
> > > install
> > > anything on my server if I need to.
> > >
> > > Thank you,
> > > Robert Zolnar
> > >
> > >
> >
> >
>
>

Need Advice

I just want to ask for any good advice here ragarding my project. I'm planning to create a program that will use an sql server as a database. I have 3 branches and I need the branches to be updated always when they create any transaction or changes. The sql server will be installed in a PC with Windows Server 2003 and with a public IP. the question is can I access the sql server from other branches by using the public IP of the ServerPC thru the Internet? If yes, how? if no, is there a best way to do this updating method?

Thanks!

It is not clear if you are considering that each branch will have a SQL Server and need to transfer data changes to the other branches, or if there is a 'central' SQL Server -with or without branch servers. That makes a 'big difference' with the kind of opinions you will recieve...

The 'best' method is Replication. That is what it is designed to handle. However, Replication between the branch SQL Servers is NOT included with SQL 2005 Express. (If you are using Express.)

Otherwise, you need to plan for service disruptions. What happens if the connection cannot be made?

Will you have a Queueing table that holds changes until their is confirmation they were recieved at all the branches?

IF you have a central SQL Server, and you expose it with a public IP, you will have every hacker in the world (literally) constantly attemping to get in. You MUST have a iron tight security plan and you will still be vulnerable.

|||I am planning to put a sql server for all branches where they will store per Branch Transaction so that I will not have a problem when there is no Internet. If ever there online already, the program will then connect to the central sql server to update the branches transaction. is that possible? how can i connect to the central sql server thru the internet?

Thanks for the advice.
|||If all machines are accessible to each other (e.g. you can ping, or telnet), then it's easy to connect to the central sql server(or each other). Just enable TCP on your central sql server and use TCP to connect from other machine. You can use DNS name of the server machine to connect. You may not be able to use Windows Authentication. I assume you will use some form of firewall to protect your system. You can generate a rule to only allow connections from your client machines.|||

In order to handle 'network outages', Transactional Replication would most likely be the preferred option. (Not available with SQL Express.)

And, as Xinwei indicates, you will have to open and protect the firewall for the appropriate IP ports.

Saturday, February 25, 2012

Need %complete stat from stored procedure to vb

Is there a way to call a SQLServer stored procedure from within VB6
and have the % completion stat be returned to the calling program as
it is updated? Our clients hate seeing static screens and while this
procedure is processing I want to be able to display it's progress.
Thanks!Not from a single statement, there's not any way to get back the completion
status from a query.
Some operations, which are predictable, like BACKUP, has an option to get ST
ATS back, but not for
general DML statements. If your procedure is executing *several* statements,
you can use RAISERROR
using the NO_WAIT option to make SQL server flush the output buffer for each
RAISERROR statement.
For a single query, fake it... :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Mark V" <mgvincent@.excite.com> wrote in message
news:96887154.0411170859.77244be0@.posting.google.com...
> Is there a way to call a SQLServer stored procedure from within VB6
> and have the % completion stat be returned to the calling program as
> it is updated? Our clients hate seeing static screens and while this
> procedure is processing I want to be able to display it's progress.
> Thanks!

Need %complete stat from stored procedure to vb

Is there a way to call a SQLServer stored procedure from within VB6
and have the % completion stat be returned to the calling program as
it is updated? Our clients hate seeing static screens and while this
procedure is processing I want to be able to display it's progress.
Thanks!Not from a single statement, there's not any way to get back the completion status from a query.
Some operations, which are predictable, like BACKUP, has an option to get STATS back, but not for
general DML statements. If your procedure is executing *several* statements, you can use RAISERROR
using the NO_WAIT option to make SQL server flush the output buffer for each RAISERROR statement.
For a single query, fake it... :-)
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Mark V" <mgvincent@.excite.com> wrote in message
news:96887154.0411170859.77244be0@.posting.google.com...
> Is there a way to call a SQLServer stored procedure from within VB6
> and have the % completion stat be returned to the calling program as
> it is updated? Our clients hate seeing static screens and while this
> procedure is processing I want to be able to display it's progress.
> Thanks!

Need %complete stat from stored procedure to vb

Is there a way to call a SQLServer stored procedure from within VB6
and have the % completion stat be returned to the calling program as
it is updated? Our clients hate seeing static screens and while this
procedure is processing I want to be able to display it's progress.
Thanks!
Not from a single statement, there's not any way to get back the completion status from a query.
Some operations, which are predictable, like BACKUP, has an option to get STATS back, but not for
general DML statements. If your procedure is executing *several* statements, you can use RAISERROR
using the NO_WAIT option to make SQL server flush the output buffer for each RAISERROR statement.
For a single query, fake it... :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Mark V" <mgvincent@.excite.com> wrote in message
news:96887154.0411170859.77244be0@.posting.google.c om...
> Is there a way to call a SQLServer stored procedure from within VB6
> and have the % completion stat be returned to the calling program as
> it is updated? Our clients hate seeing static screens and while this
> procedure is processing I want to be able to display it's progress.
> Thanks!