19 Topics

Member Avatar for
Member Avatar for Amiet_1

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]) …

Member Avatar for Amiet_1
0
986
Member Avatar for necrovore

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 …

Member Avatar for necrovore
0
357
Member Avatar for necrovore

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 …

Member Avatar for necrovore
0
257
Member Avatar for sphe_g

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, …

Member Avatar for BitBlt
0
459
Member Avatar for Zemorg

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 …

Member Avatar for Clinton Portis
0
1K
Member Avatar for sharon.chapman7

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 …

Member Avatar for gusano79
0
260
Member Avatar for FraidaL

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 …

Member Avatar for FraidaL
0
181
Member Avatar for alexander1s

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: "; …

Member Avatar for ben1996123
0
109
Member Avatar for Alice1990

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] …

Member Avatar for Ancient Dragon
0
181
Member Avatar for iamthesgt

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 …

Member Avatar for iamthesgt
0
170
Member Avatar for bunnyboy

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 …

Member Avatar for bunnyboy
0
209
Member Avatar for vt2009

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 …

Member Avatar for Kimpl
0
127
Member Avatar for Defensor

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 …

Member Avatar for Defensor
0
206
Member Avatar for saransh60

[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 …

Member Avatar for Ancient Dragon
0
167
Member Avatar for theblastedfool

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 …

Member Avatar for mattjbond
0
214
Member Avatar for mbrinkley

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 …

Member Avatar for mbrinkley
1
173
Member Avatar for richman0829

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. …

Member Avatar for richman0829
0
155
Member Avatar for nuB

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 …

Member Avatar for nuB
0
116
Member Avatar for plastic

hi hi, i have a .hex file and i have to read it and convert and sasve it in decimal format. any ideas plzzz

Member Avatar for ddanbe
0
2K

The End.