|
I think just the "AS" keyword is missing from your original code. The use of CREATE OR REPLACE is valid at anytime.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
Hi,
How to access database of MS Access from SQL Server?
eg:
I have a MS Access database with empoloyees details. From SQL Server database i need to get the employees details from MS Access.
Thankyou,
YPKI
|
|
|
|
|
hi
Right-click on the database in SSMS object explorer, select TASKS --> IMPORT DATA
from the window follow the remaining instructions.
Rajesh B --> A Simple Programmer <--
|
|
|
|
|
There is no IMPORT DATA in TASK. I am Using 2005 SQL Server. Also i want to connect with ms access to retrive the employees details from a stored procedure when requried.
|
|
|
|
|
Try this link[^]
Go to the section that says Create an Access project.
|
|
|
|
|
Create a linked server[^], and copy the records over into a table in Sql Server.
Bastard Programmer from Hell
|
|
|
|
|
Use this
SELECT TestField1 as t1_from_C_Drive From OpenRowset('Microsoft.Jet.OLEDB.4.0',';Database=C:\temp\Test.mdb;',
'SELECT * from T_Test') as b
|
|
|
|
|
Dear All,
My requirement contains an windows application that can be installed any where over the world but the server will be in one place which will be accessed via internet.
Note : the same db will be accessed from web application also for reporting.
I plan to use MSSQL 2005 version and my db has image datatype also.
i am using the image data type in the db, when i try to query this it is taking more time for replying...
is it advisable to use the same? or is there any way to accomplish the same by using any other data types.. i tried usign varbinary (max) now the perfomance is little better than that.. but still slow.
Please guide me .
thanks in advance.
|
|
|
|
|
If your purpose is to store files in the database, I would suggest you store the files in the file system and just store the path to the files in the database in a varchar column.
Serving files from the file system is much faster than serving it from the database. The are pros and cons to both approaches. You may want to do some research and benchmarks before deciding which one to use.
|
|
|
|
|
Dear Shameel,
First of thank you very much for your time to reply.
Actually its not an file storage its an data storing.. say for example i want to store the details of an employe like name, age,sex ,address,... and his/her PHOTO... so here comes the image plays the role..
so this is the requirement. am bit confused to use the general MSSQL server to use it from internet as it will create problem by perfomance..or something.
thanks
|
|
|
|
|
Hi Hema,
Shameel is quite correct you can store in web server it self. But in security concerns it will not quite good but you can achieve that also by providing a user and giving read/write permission for that user and use it while storing it in web server.
If you still want to use it please put (nolock) while you are retrieving information of image or any thing as you said same db is using for reporting.
|
|
|
|
|
Information like name, age, sex, etc. can be stored using appropriate data types like varchar, int, etc.
Photos can be stored using two ways:
One is to store the photo as binary information in an image column.
The other is to store the photos as jpeg images on the file system and store their paths in a varchar column.
Each of these approaches have advantages and disadvantages of their own, you may want to explore these options further and see what works for your situation.
|
|
|
|
|
once again thanks to you and shameel for your time in replying.
as you peoples mentioned i can save the file in the web server. But as i mentioned earlier i will be using the windows application to save the images and i will retriving the same in windows application.
In that case i need to share the folder (to all the machines ??? ) rt..it may cause security violation.. so there is only one way to store is database rt?
so i need to compromise the perfomance of the applcication...
|
|
|
|
|
Hema Bairavan wrote: In that case i need to share the folder (to all the machines ??? )
No, you don't have to and you should not.
You can build a web service that serves images. Google can help you find code samples to get you started.
|
|
|
|
|
thanks shameel.. i will check that case and get back to you..
thanks in advance
|
|
|
|
|
You may want to look into writing a Web Service (WCF) and access that from your clients.
I agree with putting the image in the database (I don't trust the file system), but you should only access it when you need it, not every time you access the record.
I also suggest you put the images in a separate table.
|
|
|
|
|
PIEBALDconsult wrote: I don't trust the file system
And where do you persist your database? Even if it is on a good old magtape, that still probably implies a file system of some kind.
|
|
|
|
|
|
Trusting it not to lose one big file is one thing, also trusting it not to lose many small ones is another.
(Easier to back up too.)
|
|
|
|
|
Hema Bairavan wrote: is it advisable to use the same? or is there any way to accomplish the same by using any other data types.. i tried usign varbinary (max) now the perfomance is little better than that.. but still slow.
It's slow because you're fetching a blob from the database. Host it on a webserver and store the path, you'll find that the browser simply caches the picture.
Bastard Programmer from Hell
|
|
|
|
|
|
If you chose to store the images in the database, you could improve performance by optimising your queries and also retrieving images only when needed e.g. user clicks some button to see/view image.
|
|
|
|
|
hi
i have same application with database installed in different cities, each one stand alone. the reason is network connectivity is very poor.
with this, i have to manage user access in all the above installations seperately.
i am facing delays / time waste with maintaining same access / password at all locoations.
any suggestion..
|
|
|
|
|
one of the solution is see is transactional replication with updatable subscriptions...but i can see microsoft is going to stop it in future
the problem with triggers is that the network link may not be up all the time
|
|
|
|
|
I'd say do the transactional replication for now. Then start planning for a more robust application e.g. one central database accessible over the web. Develop the web app such that very little data has to travel over the web at a given instant.
|
|
|
|