Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Going From Byte() To File Open Of Download


Hello, I'm having users upload documents to my db and storing them as an Image datatype, I can do that without an issue.  I'm also able to find that record and return it as a byte().  Now, what's the best practice/scheme to return it to the browser, even FF, and have it prompt the user with the Open or Download thing Dialogue we all know and love.

 

Thanks in advance.




View Complete Forum Thread with Replies

Related Forum Messages:
Help With Error 'value Of Type Byte Canot Be Converted To 1 Dimensional Array Of Byte'
hi
i am getting an error with my code, it says 'value of type byte canot be converted to 1 dimensional array of byte' do you know why and how i can correct this error, the follwoing is my code.
can anyone help me correct the error and let me know ow to solve it
thanks for any help givenPublic Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequestDim myConnection As New Data.SqlClient.SqlConnection("ConnectionString")
myConnection.Open()
 Dim sql As String = "Select Image_Content from ImageGallery where Img_Id=@ImageId"Dim cmd As New Data.SqlClient.SqlCommand(sql, myConnection)cmd.Parameters.Add("@imgID", Data.SqlDbType.Int).Value = context.Request.QueryString("id")
cmd.Prepare()Dim dr As Data.SqlClient.SqlDataReader = cmd.ExecuteReader()
dr.Read()
context.Response.ContentType = dr("imgType").ToString()context.Response.BinaryWrite(CByte(dr("imgData"))) ----- this is the line with the error
End Sub

View Replies !
From Byte[] To A .rdl File
Hi,

Can we regenerate a .rdl file based on the byte[] stream created by Render method?

user sends the report name with parameters to application server and it is application server sends the request to Reporting Server and get the report back (Render method). But how to pass the returned byte[] stream to user and show her/him a report?

View Replies !
Can't Open SQL Server Management Studio After SQL 2005 Trial Download
I installed "successfully" the SQL 2005 Trial download but I can't find an executable to launch the Business Intelligence and SQL Server Management Studio  programs.  They don't appear on the start up menu and I can't find them in the programs folder.

View Replies !
Ftp Task- 0 Byte File
hi,

i'm using FTP task in my control flow and using *.xml to receive all files at a particular ftp location. Often I see that a 0 byte file is created by the IS package, instead of transferring the file. Is this a known bug? Is there a way to circumvent it? Also, on one of the occasions, the package just hanged for about 60 minutes (while atttempting to receive the file). FTP Connection timeout was set to default (60 sec), I wonder why the FTP task didnt return a timeout error!

Any clues?

regards,

Ali

View Replies !
Bulk Insert From Zero Byte File
Ok, hope someone has an idea out there. I have eight fixed width text files that I am importing into SQL 2000 tables in stored procedures called from a vb.net program. Problem is one of the files stands a good chance of being 0 k. As of I now i call one stored proc that then calls one proc for each file. If i try to run it anyhting after the zero byte file fails to import. If i remark it out everything else imports. I check for file.exists on the vb.net and the file passes the test. Any way to handle the 0 byte on the proc side

View Replies !
DTS Package - How To Prevent A 0 Byte File?
I've created a DTS package -- that uses a query to export to a .txt file. My question is -- if the results of this query are zero (no results returned within the package ) -- how can I tell the package not to export a zero byte file. Any thoughts on that? Any help you could give would be greatly appreciated. Thanks!

View Replies !
DTS - Zerp Byte File Import And DontExecuteTask
Hi, I'm a bit new to DTS but the problem I have encountered relates to importing a text file. On occasion the file is zero bytes which causes an error in DTS. I have added some VBScript to the workflow to check the filesize. If size > 0 then I set Main = DTSStepScriptResult_ExecuteTask otherwise Main = DTSStepScriptResult_DontExecuteTask. This all works fine except that when the file is 0 the dependent process that is waiting for completion/success does not run, presumably because the task was not run (as reqd). I have tried setting the status rather the DontExecuteTask but then the task runs anyway creating the error. Anyonw know how to get this to work or how to get around the problem?

regards
Ken

View Replies !
Writing Byte Stream To Flat File Destination (ebcdic)
Hello all,
  I was trying to run a test to write a ebcdic file out with a comp - 3 number (testing this for other people) and have run into a problem writing the string out to the flat file destination.  I have the following script component:



Code Block
 
' Microsoft SQL Server Integration Services user script component
' This is your new script component in Microsoft Visual Basic .NET
' ScriptMain is the entrypoint class for script components
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Public Class ScriptMain
Inherits UserComponent
Public Overrides Sub CreateNewOutputRows()
'
' Add rows by calling AddRow method on member variable called "Buffer"
' E.g., MyOutputBuffer.AddRow() if your output was named "My Output"
'
Output0Buffer.AddRow()
Dim myByteArray() As Byte = {&H12, &H34, &H56, &H7F}
Output0Buffer.myByteStream = myByteArray
Output0Buffer.myString = "ABCD"
Output0Buffer.myString2 = "B123"
myByteArray = Nothing
End Sub
End Class
 
 


I have added myByteStream as a DT_BYTES length 4, myString as (DT_STR, 4, 37) and myString2 as (DT_STR, 4, 37) to the output 0 buffer. 
 
I then add a flat file destination with code set 37 (ebcdic us / canda) with the corresponding columns using fixed width.
 
When i place a dataviewer on the line between the two the output looks as I expect ("0x12 0x34 0x56 0x7F", "ABCD", "B123").  However, when it gets to the flat file destination it errors out with the following:
 



Code Block
[Flat File Destination [54]] Error: Data conversion failed. The data conversion for column "myByteStream" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
 
 
If i increase the size of the byte stream (say, to 50) the error goes away but I am left with the string "1234567F" instead of the appropriate hex values.  Any clues on how to go about this?  I obviously don't care if it gets transferred to "readable" text as this is supposed to be a binary stream, thus the no match in target page seems superfulous but is probably what is causing the problems.
 
NOTE: this is relating to the following thread (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2300539&SiteID=1) in that I am trying to determine why these people are not seeing the "UseBinaryFormat" when importing an EBCDIC file (i see this fine when i use an ftp'd file, but it auto converts to ascii) with comp-3 values.  I also see the "UseBinaryFormat" when I am importing a regular EBCDIC file which I create that has no import errors with zoned decimals.

View Replies !
Using Batch File To Download Flat File From Ftp Server So Can Bulkcopy Into Database
I use RUMBA and write FOCUS programs to pull data from our mainframe so I can then import the flat file into our Data Warehouse. I'm trying to eliviate some steps here and want to include the downloading of the flat file from the FTP Server to my server where I can then continue with the rest of the batch file and bulkcopy the data into my Data Warehouse. I can't figure out what code to use in the batch file to do that though. Can anyone help me please? I need help with the batch code to ftp the file to my server.

Thanks!
Jennifer

View Replies !
SQL2005 Data Import Error, Unicode Data Is Odd Byte Size For Column &&<n&&>. Should Be Even Byte Size
Hi, I have a problem importing data from SQL Server 2000 'text' columns to SQL Server 2005 nvarchar(max) columns.  I get the following error when encountering a transfer of any column that matches the above.
The error is copied below,

Any help on this greatly appreciated...

ERROR : errorCode=-1071636471 description=An OLE DB error has occurred. Error code: 0x80004005.An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80004005  Description: "Unicode data is odd byte size for column 3. Should be even byte size.". helpFile=dtsmsg.rll helpContext=0 idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC} (Microsoft.SqlServer.DtsTransferProvider)


Many thanks

View Replies !
How To Download A File From SQL Server In My Web APP
Hello people,

Do you know how can do for downloading a file stored in a database?. I'm using a table with a FILE field for storing the file.

I know i have to create a special aspx page for downloading, that receives parameters to locate the proper record in the table and then retrieve the file in memory to start downloading.

I have done this with file located at specific folders but not a database's field.

Another thing... the file may be big.

Dou you have any idea about retrieving from sql and sending the file back to the final user?

I really appreciate your support.

Larry.

View Replies !
How Download File From Database?
How can I download a file that is previously uploaded to database?
Of course its kind is Byte.

View Replies !
Download A Pdf Or Jpeg File From Database To Asp.net 2.0
I was able to insert my doc(jpg, gif,., type) into the oracle database using store procedure. However i am not able to retrieved(download)  the data. I don t know why my code is not working.
I hope to get your help. god bless ya all.
This is my code and if you have different way of doing it, please let me know
################## C#  button clickpublic void grdPreviousFile_DownloadClick(object sender, EventArgs e)
{LinkButton lnkClick = (LinkButton)sender;
GridViewRow grdRow = (GridViewRow)lnkClick.Parent.Parent;string fileName = grdRow.Cells[0].Text;
int loanNumber = Convert.ToInt32(lblRevLoanNum.Text);OracleConnection conn = new OracleConnection(_connectionString);
OracleCommand cmd = new OracleCommand(" SP_DOWNLOAD_FILE", conn);cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("P_IN_RE_LN_NO_KEY", OracleDbType.Int32, loanNumber, ParameterDirection.Input);
cmd.Parameters.Add("p_in_MM_FILE_NAME", OracleDbType.Varchar2, fileName, ParameterDirection.Input);
try
{
 
 cmd.CommandType = CommandType.StoredProcedure;
conn.Open();OracleDataReader myDataReader = null;
myDataReader = cmd.ExecuteReader();// (CommandBehavior.CloseConnection);
 while (myDataReader.Read())
{Response.ContentType = myDataReader["MM_MIME_TYPE"].ToString(); byte[] fileData = new byte[(int)myDataReader["MM_BLOB_CONTENT"]];
Response.BinaryWrite(fileData);
}
conn.Close();Response.Write("Person info successfully retrieved!");
}catch (Exception SQLexc)
{Response.Write("Read Failed : " + SQLexc.ToString());
}
}
 
################################# this is the store procedure
SP_DOWNLOAD_FILE(p_in_RE_LN_NO_KEY IN number,p_in_MM_FILE_NAME IN mm_attachments.MM_FILE_NAME%TYPE) AS
v_mime VARCHAR2(48);
v_length NUMBER;
v_file_name VARCHAR2(2000);Lob_loc BLOB;
BEGINSELECT substr(MM_MIME_TYPE,2,4), MM_BLOB_CONTENT, substr(MM_FILE_NAME,1,(instr(MM_FILE_NAME,'.',1,1)-1)),MM_FILE_SIZE
INTO v_mime,lob_loc,v_file_name,v_length
FROM MM_attachments
WHERE RE_LN_NO_KEY = p_in_RE_LN_NO_KEY AND MM_FILE_NAME = p_in_MM_FILE_NAME;
--
-- set up HTTP header
--
-- use an NVL around the mime type and
-- if it is a null set it to application/octect
-- application/octect may launch a download window from windows
owa_util.mime_header(v_mime, FALSE );
 
-- set the size so the browser knows how much to download
htp.p('Content-length: ' || v_length);
-- the filename will be used by the browser if the users does a save as
htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
-- close the headers
owa_util.http_header_close;
-- download the BLOBwpg_docload.download_file( Lob_loc );
end;
 
 
 

View Replies !
Download The File Stored In SQL Server
Hi
i have a .cer (Certficate file) stored in sql server 2000. i need to get that file from sql server and save it on the server so that i can get information out of that file. how can i do that, how to get the file and store on server. i dont want to download the file as it will be downloaded to my local machine whereas i want it to store it on server and than take some information out and display it to user.
i know that it can be done using memorystream and filstream, but how.
thanks in advance 
cheers

View Replies !
Upload (or Download) A File Into (or From) A MS SQL Server DB
I would like to design a content-management feature on a website, in particularbe able to upload a binary file and to store it into a MS Sql Server DB.be able to download it afterwards. The sizes of the files are very limited (less than 100Kb) so I do not need any special feature to handle the upload/download.Does anyone know how to achieve such feature?Thanks in advance,Joannes

View Replies !
Download SQL Server 6.5 Toa Text File
I am trying to download a table (all character fields) to a text file using bcp. Some fields in the table contain null values. Can I pack the null fields, which mean no space shows on text file? How?

Your help would be appreciated! Thanks.

View Replies !
How Do You Upload And Download Images And File From Database?
Hi,

how do i upload and download images and files from database row?is there anyway i can upload images so that uploaded images ares saved in a listbox and at the same time in the IMAGES folderin the solution explorer as well so that i can later select an image fromlistbox and download it when needed? i m using c#,vwd2005 express,sql express.

thanks.

jack.

View Replies !
Download File That Is Stored In Sql Server Database
Hi, I have tried to implement file download option. I can download file which is stored in any folder. Code is...        string filepath = Request.Params["file"].ToString();        string filename = Path.GetFileName(filepath);        Response.Clear();        Response.ContentType = "image/gif";        Response.AddHeader("Content-Disposition", "attachment; filename=" + filename);        Response.Flush();        Response.WriteFile(filepath);This code is working fine. But now I am facing a problem. Files (not the path) are stored in database table. User can download file from the database. How can I do this? The file may be a .txt, .doc, .xls, .jpg or .gif.

View Replies !
Download The SQL Servere Date To Excel File Using ASP.net
Hi EveryOne
I would like to download the SQL server databse to excel file using ASP.Net
I need to download the one table to excel file. If anyone knows please help me.
With Regards
 
Nibu Abraham 
 

View Replies !
DTS Problem With AS400 Flat File Download
I'm having trouble importing a text file that was ftped down from an AS400 fixed length flat file. The text file appears to be formated correctly when I open it (1 record per line fixed format) but when I try to import it ASCII delimited it doesn't appear to be in that format and I'm not familiar at all with the AS/400 file formatting. This seems to only be a problem when the last field in the file is variable length. If the last field is a char 1 field it imports OK. Any idea on what I'm doing wrong with the import? I'm I going about this all wrong? Is there an easier way to get data into SQL Server from this AS400 flat file?
Any help would be greatly appreciated!!
Thanks,
Deidre

View Replies !
How To Download The Result Of SQL In Stored Procedure To A File On PC?
 

Hi,
I have written a stored procedure to upload a file to a table.
I am quering this table and want to download the result to a file.Can someone please help me to do this ?
 
Thanks,
Naguveeru

View Replies !
SQL Server 2005 Trial - Which File To Download?
Hi all,

I am extracting SQL server 2005 trial edition to my flash memory hard drive.

Hence suppose I should download one of the following three files:

"Self-extracting executables:

X86 Executable
X64 Executable
IA64 Executable "

But which one should I choose? based on what criteria ?

(This point seems clear to everyone but myself, even after I went through all the docs on the download site)

Thanks,

Jack (an absolute beginner)

View Replies !
Download The File Stored In Sqlserver Table As Image Datatype Using Asp.net 2.0
 I am using Asp.net 2.0 with C# and sql server 2000. I need to download the file  which is stored in sql server database table as image datatype. So I need to download from cs page. Pls reply,Arun.   

View Replies !
Download/ Uninstall Problem: Error Indicating Corrupt File
I hope someone can help me here. Here is some background.
 
As I was attempting to download SQL Express, the download dialog box timed out. When I x-ed out of the download, Windows XP Professional 2002 threw up an error message indicating that the dialog box was non-responsive, and I elected to close it.
 
I downloaded SQL again successfully, and installed with no errors. I then attempted to create a new db through Visual Web Developer. Instead of creating a database, Visual Studio returned an error saying that I did not allow for new database objects, and that I should change my permission settings. I could not figure out how to do this, so I uninstalled SQL Express.
 
After re-starting, I got the following message: €œYour SQL Server Installation is either corrupt or has been tampered with (could not open SQLEVN70.RLL). Please uninstall then re-run setup to correct this option.€?
 
I uninstalled MS SQL again from the Add/Delete Programs on my Control Panel. On re-start, I received the same error again. On my Programs list, MS SQL is not present, there are several MS SQL files in the path C:Program FilesMicrosoft SQL Server.
 
So I located the Visual Studio uninstall tool and attempted to run it. I received the same error:  €œYour SQL Server Installation is either corrupt or has been tampered with (could not open SQLEVN70.RLL). Please uninstall then re-run setup to correct this option.€?
 
Any ideas on how to uninstall the files in my program files so I can load a clean copy of SQL?
 
 

View Replies !
Cannot Attach Mdf: Create File Encountered Operating System Error 5 While Attempting To Open The Physical File...
I have used the copy database wizard, but I realized I had forgotten to shrink the transaction log file. So I canceled the wizard. My database, detached by the wizard, has now disappeared. The mdf file is still there, but when I try to attach it manually I get the "create file encountered operating system error 5 while attempting to open the physical file..." error.

Any way I can recover it?

Thanks.

View Replies !
Could Not Open The File For Reading. Close Any Other Application That May Be Locking The File.
this error is a major pain in the bum. i have dealines to meetrequiring i import excel speadsheets into sql server. i have this onespreadsheet and i cannot for love nor money import it into sql server!i selected task manager to close any invisible instances of excel etc.i rebooted twice, knocked out indexing service on may machine etc. etc.then just for an experiment i removed the parenthesis from thefilename.... UK Brand Alias List (3 Dec 2004).xlslo and behold it worked, nice to know there are some small bugs likethis in a flagship enterprise level microsoft product!tristian2 of ewelme

View Replies !
Unable To Open The Physical Mdf File Or Log File Because It Is Being Used By Another Process
 
Unable to open the physical mdf file or log file because it is being used by another process
 
I am trying to write a Windows Application using ASP.NET 2.0, C#2005 EXPRESS, and SQL 2005 EXPRESS.
 
I had followed the introductory video to create a connection to the Database using Windows Authentication, and use the wizard to create a dataset and checking all the tables in the database.
 
After that I dragged a table from the data source created from the above process. The Details Grid so created is able to perform update, delete and addition of records.
 
But when I went back to the database at my PC I wasn€™t able to connect to the database. And if I opened the database first and then load the windows application and perform some database operations and went back to the physical database I wasn€™t able to open the tables in the database.
 
The error message is that the physical database connection cannot open the .mdf file or log file because another process is using the database. I guess it refers to the Windows Application.
 
Is this normal? Will it have any implications after the application is deployed? I suppose that there isn€™t a scenario where a Windows application and a physical process will access the database at the same time.
 
Will appreciate some feedback and advice on this scenario and whether it is a problem.
 
 Thanks and regards
 
OldStd

View Replies !
How Should I Open A .DBF File...
Hi,
  I have couple of .DBF files that i need to open which software should i use to open them.... can i open it with Sqlserver
 
Regards
Karen

View Replies !
DTS To Run Open File
Hi All

On the Sql Peformance Monitor, I have scheduled a log to give me memory and perfomance of my server and I store the results in .csv file every hour and it works perfect.

Here comes the problem when I make a DTS to take data from .csv to Sql, my problem is, I get this error "The process cannot access the file because it is being used by another process". Basically it tells me that I have to close the file before I can run my DTS.

I dont want close this file manually and run my DTS afterwards, I want my DTS to do this automatically since I won't have access to that server when I am finished as I am going off from the clients premises when I am finished

View Replies !
How To Open A DTS File Given To Me
I was given a dts file to look at based on the Northwinds DB. The file was not password protected and comes from a SQL Server Configured exactly like mine. Is there a way to open this file in the DTS design window? I could not find anything in BOL or help.
Thanks

View Replies !
Can Not Open File
Hello,
Using a foreach loop which contains dataflow. Inside dataflow there is a flatfile source.
The following error is produced inthe flat file source.
 
Error: 0xC020200E at Data Flow Task, Flat File Source [446]: Cannot open the datafile "EqRonnieHK".

Error: 0xC004701A at Data Flow Task, DTS.Pipeline: component "Flat File Source" (446) failed the pre-execute phase and returned error code 0xC020200E.

 
Please note, the file does indeed exist

 
Thanks

View Replies !
Cannot Open .sdf File In QA3.0
 

Hi,
 
We are using VS 2005 with SQL Server Mobile Edition. We created the .sdf file on the desktop and added this file to our VS project and set the Build Action to content. Next we deployed our app on Symbol PDA which has Windows CE 5.0 as the OS. We followed the following steps:
 
1. Deploy the app.
2. Install .NET CF 2.0
3. System_SR_ENU.CAB
4. sqlce30.wce5.armv4i.CAB
5. sqlce30.dev.ENU.wce5.armv4i.CAB
6. sqlce30.repl.wce5.armv4i.CAB
 
We now tried to double-click the .sdf file in PDA to open in QA3 but we get error.:
Error: 0x80004005 E_FAIL
Native Error (0)
Description: Interface defining error: IID_IDBInitialize
Param. 0:0
Param. 1:0
Param. 2:0
Param. 3:
Param. 4:
Param. 5:
 
What could be the issue?
 
Because of this, we unable to run the app since in our login form, this database is not available and hence we cannot proceed.
 
Regards,
Vilas

View Replies !
Can't Open Aspnetdb.mdf File
I am fairly new to ASP.NET and MSSQL but when I run my website with memberships and roles everything seems to work perfectly!! NO PROBLEMS!! However when I try to go and actually open the ASPNETDB.MDF database file that was automatically created by VB when I added a login and sign up panel I get this Error Message
"An attempt to attach an auto-named database for file C:Documents and SettingsoxMy DocumentsMy Webs nsApp_DataASPNETDB.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."
I don't really know why I can't open this file. I have someone who is going to help with some extra database work but asked if I could open this database so he could see the structure of it.  I have a copy of the website as backup in another folder on my computer but even removing that backup does nothing in helping open the original. THANKS PLEASE HELP!
Mark

View Replies !
Open MDF File Without MSDE
Hello,I'm trying to access .mdf file (a sql server database) without havingSQL Server installed on the machine (neither MSDE).It can be done from any programming language (like Java or C#)?Is there anyone who knows how can I do it?Or does a native library that can access the .mdf file exist?Thank to anyone who can help me...Pietro.

View Replies !
Too Many Open File Handles
Hello Friends,

Sometimes, we get errors on our Web server or on our SQL server of ‘Too many open file handles’.

Here is the error message it throws.

Microsoft OLE DB provider for SQL SERVER error '80004005'
[DBNMPNTW] Too many open file handles.

/MyTestFolder/reports/Salesreport.asp, line 141.

It is easy to ‘fix’ the problem by restarting the server. However, we’d like to know what files are opened. We don’t know what is causing the problem.

Is there a way to find out what files (or resources) are opened on a Web Server or SQL server running on NT 4.0?

We have tried to fix this problem by increasing the physical memory (ram) on our servers. Then we tried to increase the page file size – so the page file size matched the size of the physical memory (ram). But the problem still occurred.

Please help me.

Thanks in advance,
Jon.

View Replies !
Open Excel File
hey
I am just trying a simple query of an Excel file.

Select * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=C:MyFile.xls;HDR=YES', 'SELECT * FROM [Sheet1$]')


and i am getting this error

Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. The provider did not give any information about the error.
OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.].


I know for a fact that the path is correct and that it is the path of the server. So what is the problem with this??

tibor

View Replies !
Could Not Open Output File
Hi All,
Sql server 7

I have webassistant job that are running every one minute. they run sometimes and sometimes they fail.
the error message in job history is

error no 16821
SQL Web Assistant: Could not open the output file.

TIA
Adil

View Replies !
Open File Function In T-sql/dts?
Is there a way to open a binary file for read directly from t-sql? Or must I use a dts job?

Rufus

View Replies !
How To Open A DTS Package From A File
I am trying to open a previously saved DTS Package from the Local machine. How do I do this

View Replies !
Can Not Open Access File
Hi, Everyone,

Currently I can not open an MS Access file that was brought from one of the Europe offices, I got a error message "ODBC--Cnnection to Supportdb_sql7.mdb failed when I tried to open it. Supportdb_sql7.mdb is the file name.

Thanks in advance,

Jason

View Replies !
Open File Manager And SQL 7
Has anyone tried Open File Manager to backup SQL 7? I'm in the middle of an evaluation (and all is going well), so I wanted to get other's opinions before I purchase.

I tried their 5.x product a year ago, and it didn't work. But V6 has been just what they toted (it worked, no questions asked).

Thanks,
Charles
Backup Integration Manager
CDW Reseller

View Replies !
How Can I Open A SQL Server BAK File?
I do not have a copy of SQL Server, but I was sent a 400M bak file to convert to MySQL format. Any suggestions on how I can open it?

View Replies !
Ssis - Can Not Open File
Hi,
Using ssis, is it possible to refresh the data inside an excel file which is sitting on a separate machine (i.e. machine B) on the network?
When I try this using the importy wizard, the error message is:
The microdoft jet database engine can not open the file \pathnamedata.xls. It is already opened exclusively by another user, or you need permission to view it's data.
I have checked and the file is closed. No excel is running when checking the processes.
I have given myself full permission on that file from that machine where data.xls is sitting.
Thanks

View Replies !
Open File From Report?
Hello,

I am trying to open a file on a network drive from a report. The file's location that I need to open is stored in the db for each record. I have tried using javascript to open a new window using the File:/// prefix. I have been able to open a new windows and navigate to a URL in this fashion by using a javascript window.open call and placing it in the navigation tab of the textbox. When I try this with a file, however, I get an access denied message. I was thinking to try opening the file by using the System.Diagnostic.Process.Start() method from code, but I'm not sure how to wire that up to the OnClick event of the textbox on the report. Does anyone have any ideas?

View Replies !
Check If File Is Already Open
Hi,
I wrote a VB code to generate a xls file. Users are able to run it fine but if they have another file with same name already open, then it just crashes excel.
So I want to include a code that checks if file "file.xls" is open on user's machine.
    If file is open, then message "file "File.xls" is already open. Generating File_1.xls"
   Run the code but create the file with file name "file_1.xls"
   If file doesn't exist, then run code and create file with file name "File.xls"
 
So basically I want the code to run and generate the file. Only difference is that if file with same name is already open, then just rename the newly created file.
 
Here's the code I've created for generating the file:
 
Public Function getrmpricing()
Dim queryoption As String
Dim ans, Msg As String
Dim fs As Object
Dim sTemplateFile As String
Dim e_TemplateFile As String
On Error Resume Next
    
    sTemplateFile = g_dashboard & "crm proposal input.XLT"
    e_TemplateFile = "C:"
                
            
    If Forms!rmpricingdataform!BU = "CS" Then
        MsgBox "No template available for CS!", vbOKOnly, "RM Pricing Report"
    Else
                
               
        Set fs = CreateObject("Scripting.FileSystemObject")
        fs.CopyFile sTemplateFile, e_TemplateFile, True
                
             
        Dim xl As New Excel.Application
        xl.Workbooks.Open e_TemplateFile & "crm proposal input.XLT"
  
             
            DoCmd.OutputTo acOutputQuery, "CustPricingbyRMCrosstabquery", acFormatXLS, "c:customerpricing.xls", True
    
                
            
        Dim xs As New Excel.Application
        xs.Workbooks("customerpricing").Activate
        xs.ActiveWorkbook.Activate
        Select Case Forms!rmpricingdataform!BU
               
                Case "CRM"
                    xl.Run "'crm proposal input.XLT'!CRM_CAPSPriceTemplate.CRM_CAPSPriceTemplate"
               
        End Select
        'xs.Workbooks.CLOSE - NEWLY COMMENTED OUT
        xl.Workbooks("crm proposal input.XLT").CLOSE
        'xl.Workbooks("crmpricing.xls").Save - NEVER USED
                               
        'fs.DeleteFile e_TemplateFile & "crm proposal input.XLT", True - NEWLY COMMENTED OUT
        Set fs = Nothing
       
        DoCmd.CLOSE acForm, "rmpricingdataform"
        Call AuditTrail("RM Pricing report", "Execute")
    End If
   
   
End Function
 
Please advise.
 
 

View Replies !
Open More Than 1 .sql File Then Execute It Once
I'm using SQL Server 2005
I'm made 4 stored procedure and save it as
sp_process1.sql, sp_process2.sql, sp_process3.sql and sp_process4.sql

i want to deploy all above SP to another machine. So far, i open it 1 by 1 and click execute in SQL Query windows 1 by 1.

How to open all .sql files but execute it once. Is it possible? Anybody know the way?

What the best way to deploy stored procedure into another machine?

View Replies !
Why Cannot Sql Server Open The File
I created a comma-seperated text file by exporting an Access table. I tried to bulk insert into into a SQL Server table using the following code:

BULK INSERT databasename.dbo.tablename FROM 'C:commaseparatedfilename.txt'
WITH (FIELDTERMINATOR = ';',
ROWTERMINATOR = '',
FIRSTROW=2)

but it returns the following error:

Msg 4861, Level 16, State 1, Line 1
Cannot bulk load because the file "C:commaseparatedfilename.txt" could not be opened. Operating system error code 5(error not found).

View Replies !
Cannot Open .fmt File Using A Stored Procedure
Hi..
  I have a website in which the user uploads a  text file to the webserver. and then i am calling a stored procedure which loads the data into the staging database using bulk copy. since my sql database and the web server are in different machines but on the same domain.. i am accessing the .txt file from the stored procedure by giving http://Ipaddress/ApplicationName/Directory/plan.txt
and the format file using the same address i.e http://Ipaddress/ApplicationName/Directory/plan.fmt
 
But when i press ctrl + click on the text file it take me to that location but when i do the same for the format file it says the page cannot be found.. Since it cannot access the .fmt file my import doesnt work.
Any help will be appreicated..
Thank you,
Karen

View Replies !
How To Open A .bup File In SQL Server/2005
I have been given a .bup file which I am told contains a database I need to access. How do I open this .bup file. Please help !

View Replies !
Unable To Open The Physical File.....
Hi, i'm trying to interface a c# application with an sql database created with Visual Web Developer Express.
I have published the site (and the db) on iis 5 (xp pro).
Everithing goes fine on accessing the database from internet,but when i try to connect the db while it's opened with my c# program  i keep an error in the sqlconnection open command:
Unable to open the physical file "C:myApp_Datamydb.mdf". Operating system error 32: "32(The file is in use by another process.)".
My connection string from webconfig:
<add name="MYDBCS" connectionString="Data Source=.SQLEXPRESS;Database=&quot;C:myApp_Datamydb.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
providerName="System.Data.SqlClient" />
.....and  the connection string for the c# program:
"Data Source=.\SQLEXPRESS;Database=c:myapp_datamydb.mdf;Integrated Security=False;Connect Timeout=30;User ID=abc;Password=abc;Trusted_Connection=False;";
I have used a user to connect the database because there was a conflict trying to open the db with Integrated Security=True.
 
Does anyone have an idea where is the error?
Many  thanks
Max

View Replies !
Open Query File Dialog Box
Hi,
SQL2K+SP4
When I load up Query Analyzer and click File -> Open to open up a query
file, the open file dialog is always sorted by - i don't know
alphabetically.
How can I set the default to open up with files ordered alphabetically?

Thanks
Helena

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved