19 Topics
| |
I have uploaded an Image into database through C# application. Here is my code. FileStream fs1 = new FileStream(toolStripLableClientSelectedImage.Text, System.IO.FileMode.Open, System.IO.FileAccess.Read); byte[] image = new byte[fs1.Length]; fs1.Read(image, 0, Convert.ToInt32(fs1.Length)); fs1.Close(); SqlCommand cmd = con.CreateCommand(); cmd.CommandText = "INSERT INTO tblClientDetails ([clFname], [clName], [clAddress], [clCity], [clState], [clPhone1], [clPhone2], [clEmail1], [clEmail2], [clProfession], [clPhoto]) … | |
Hi, I have been working on a application that used sqlserver 2008 R2. we had used filestream that was there in 2008 r2. there was a decision to move from 2008 R2 to 2012 express. Now i understand that file table is a new addition to 2012 and will do … | |
Hi, I have a filestream enabled DB and a table to store the files. Until now i used to get the path of the file that has to be saved to DB. But due to some changes this was changed and now i get a byte array. my question here … | |
Hello hi. I am seeing flames with using FILESTREAM in SQL Server 2008! I have a table (Products), in which I wanna store a link to an image stored on disk, under the ProdPicture column. This is what the script looks like: CREATE TABLE PRODUCTS ( ProdID INT PRIMARY KEY, … | |
Hey guys, i'm Working On A Project That Gets All Employees And Their Data From the User Then Saves Them in A Txt File ( Fstream ) Anyway, i figured out how to Do That But What im at stuck at now is how to search through the txt file … | |
Hi, I am getting an System.OutofmemoryException when using Filestream to load zip file. the file is 521MB. My code is: //Insert using Filestream, file into SQL Server Table private void btnInsert_Click(object sender, EventArgs e) { OpenFileDialog openFileDlg = new OpenFileDialog(); openFileDlg.InitialDirectory = Directory.GetCurrentDirectory(); if (openFileDlg.ShowDialog() == DialogResult.OK) { FileInfo fi … | |
I wrote this code for a homework problem. The instructions say that there is a list of phone numbers that were reversed (ex. 6463124137, needs to be 7314213646) and the program needs to reverse them back. My professor also included this hint: [I]"Hint: One way to reverse the number would … | |
i have to count three districts 1, 2, 3 whom said no and whom said yes, which i had saved it in notepad the three districts. i have to use the while loop. i was trying ifstream iFile; inFile.open("vote.dat") while(district1 == yes) { cout <<"the district 1 said yes: "; … | |
what is wrong with the ifstream and ofstream? I had try again and again and the info shown run to infinity. :( I tried a lot of times ady, will be glad if anyone can help, thank you :) Sorry if its looks messy, still learning all the way. [CODE] … | |
Okay, we had an assignment in computer class that I have been working on for awhile but what I've got so far isn't working. It seems that it may be a compiler issue, but since I can't get to a linux compiler (what the program will be evaluated on), and … | |
Consider those two function. When I load file, everything is fine, but then, when I want to save changes, the file is still being locked. Where is the catch? [CODE=C#] public static string Load(string loadPath = null) { string output; string file = loadPath == null ? _defaultFile : (_defaultFile … | |
I am trying to use StreamWriter to debug a stock trading application, and my code creates the file but doesnt write anything to it. I know the method is being executed because other stuff is happening but the file remains empty. I think I am missing something when I create … | |
Hello everyone. I am trying to copy data from a file stream into a char*. I know there are ways to do it with std::string and getline, but I have an assignment where I have to have a class that will take a char* into one of its constructors (which … | |
[code] #include <iostream> using namespace std; using std::cerr; using std::cout; using std::endl; #include <sstream> #include <string> #include <fstream> using std::ifstream; #include <cstdlib> // for exit function // This program reads values from the file '1.txt' // and echoes them to the display until a negative value // is read. int … | |
Hey guys, ive been working on this code for the past couple of hours and I am trying to do the following problem. Write a program that reads the le generated by randGen.cpp (in Problem 1) and stores the numbers in an array of type int. You can assume that … | |
I have been working on this program for about two weeks. I missed the day that the professor covered the material necessary to code this program due to surgery. I am now behind about 5 programs that are due at the end of the week and I'm trying to teach … | |
This seems simple, but it's not working. There IS a text file in the same directory, but it's not being opened (and with the ios::in | ios::out, it should open even if it doesn't exist). I also ran into trouble trying to use infile.fail, which is why I used !infile. … | |
hey im now starting prog in c++ n im being honest- im REALLY flustered i have to create a program to get information from a user, put the info to a file, create another program to read from that file, calculate total scores of x amount of students n grade … | |
hi hi, i have a .hex file and i have to read it and convert and sasve it in decimal format. any ideas plzzz |
The End.