C# :: Setup Not Working In Other Systems With Other SQL DB Server

Mar 7, 2014

I developed one windows application in c#.net , this application is not working when i installed the setup in another system with another sql database server-r2. How can solve this. here i had attached my code for reference.

App.config file

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="SqlCon" value="Data Source=.sqlexpress;Initial Catalog=aathi;Integrated Security=True;Pooling=False"/>
</appSettings>
</configuration>

[Code] ....

View 3 Replies


ADVERTISEMENT

C Sharp :: Submit Button (to SQL Server DB) Not Working

Nov 26, 2013

I have a submit button, where users are clicking after entering text into textboxes and (hopefully) check boxes (for yes/no).

Here is my code, and when I run it and press submit, there is no action. It just continues to loo.

 string ConnectionString = @"Data Source=.SQLEXPRESS;
AttachDbFilename=|DataDirectory|ASPNETDB.MDF;Integrated Security=True;User Instance=True";  
            using (SqlConnection dataConnection = new SqlConnection(ConnectionString))  {
                using (SqlCommand dataCommand = dataConnection.CreateCommand())

[Code] .....

Note: I took out the Checkboxes in the code to hopefully get a successful run, to no avail.

View 3 Replies View Related

C++ :: Standardizing Size Of Float Across Multiple Systems

Jan 4, 2015

I'm currently writing a cross-platform on screen keyboard application that highlights keys on the screen as you type them. My approach was to use an image of a keyboard and layer semi-transparent sprites over each key on key events, and as a consequence I needed to map out precise positions of each of these sprites relative to the background image.

The issue became how to load those positions into my application during runtime? My solution was to use excel to make a .csv of all the x-y coordinates, but instead of just deploying the .csv with my application I decided to write a quick app that parsed each line of the csv for coordinate pairs and write those floating point numbers to a binary file instead. That way the end user can't easily edit the coordinates of the sprites.

Now on to my question. The way I load the data into my application is by this method:

#include <fstream>
#include <vector>
/* other includes */
/* ... runtime code ... */
std::vector<float> pixmapPosData;

[Code] ....

This works fine on my system, but what if sizeof(float) has a different length their system? Then this function could throw a read access violation towards the end of the file (since the .bin file is exactly 508*sizeof(float) bytes long on my computer), and not to mention the coordinates would be meaningless. Is there any way to avoid this? Or maybe I just just suck it up and deploy a .csv file?

View 3 Replies View Related

C++ :: Struct Alignment Across Compilers And Operating Systems

Oct 5, 2013

I am working on extending an application that features a (rather old) plugin system. The plugin system is designed to work on x86 only, but support any and all compilers on windows, linux and also OSX.

My goals are now to

1) extend the plugin framework in a backwards compatible way
2) port it elegantly to x64

So far so good.

The plugin subsystem essentially exports a bunch of SDK function like this:

Code:
extern "C" CDECL int somefunc(int a, int b);

Which can be used by the plugin, and expect the plugin to export some function in return. When a struct is supposed to be send to the plugin, the syntax of the system goes like this:

Code:
extern "C" CDECL int RequestStructField(int field, int structhandle);

So the struct isnt handed over via a pointer, but every field has to be requested individually! From what I can tell from the comments, the developer was afraid there might be problems exchanging structs between different compilers, alignment and all.

I would like to tear down this limitation, and pass pointers to structs to plugin directly. Or better: allow the plugin to give me a pointer to an empty struct which i subsequently fill.

However, i have no control over the compiler or language used to write the plugins. Quiet some plugins are written in Delphi, some even in MASM ... both would have to support this way of passing structs.

the question is: does that work?

I have looked at other plugin systems, but they either use entirely different ways (XPCOM) or are limited to a single platform or compiler.

Some of them have a note stating that the plugin must be compiled with "byte-aligned" structs.

x86 and x64 plugins are two different stories, x64 version of the app does NOT have load x86 plugins. I dont expect there to be too man problems (right?). But we'll see, i guess.

View 13 Replies View Related

C++ :: Setup Global Variables

Feb 23, 2015

I am using VS2010 to develop an app which includes several windows forms that I am trying to set up global variables for, and I am getting a few errors like:

LNK2005: "wchar_t *dsn"...already defined in ....obj

I have a header file (externals.h) with:
#ifndef MY_GLOBALS_H
#define MY_GLOBALS_H
extern long dbg;
extern wchar_t dsn[50];
extern wchar_t u[30];
extern wchar_t p[30];
#endif

and 2 different forms, each with different namespaces, but both including the above header (#include "externals.h").One of the form .h files defines the values for these externally declared variables like this: namespace PWValidationTools{

wchar_t dsn[50] =_T("MDOTProjectWise");
wchar_t u[30]=_T("api_admin");
wchar_t p[30]=_T("proce55");
long dbg = 1;

public ref class ValidationSetupForm : public System::Windows::Forms::Form {
}

The other form file only uses these variables, never defines them.I am getting the above LNK2005 error only for the variables declared as wchar_t, not the "long" one. why I'm getting the link errors only for the wchar_t variables.

View 1 Replies View Related

C++ :: System That Communicates With Other Systems Via Messages - Struct Member Manipulation

Dec 5, 2012

I work on a system that communicates with other systems via messages. Those messages are defined in a spec and every word must be exactly as defined. To accomplish this Ada allows me to define the fields of my record to specific words in memory.

Code:
word = 4;
type Msg_Type1 is record
x: Some_Type;
y: Another_Type;
z: Another_Type;
end record;

[Code] ....

View 5 Replies View Related

C Sharp :: Make Setup With SQL Database In Installshield

Apr 20, 2013

i want make a setup for C# program with SQL data base but i can not . i use installshield but i have error in connection to database in execution program.

View 32 Replies View Related

Visual C++ :: How To Setup VOCE (Voice Recognition API)

Dec 28, 2013

All day long I tried figuring out how to setup VOCE [URL] ....

I am using VS 2010.

What I did:

* Downloaded JDK
* Downloaded the VOCE, extracted and put in c:
* Opened VS and in properties->Vc++ Direcotories:
* In Include Directories i added: C:voce-0.9.1srcc++, C:Program * FilesJavajdk1.7.0_45include, C:Program FilesJavajdk1.7.0_45includewin32
* In Library Directories i added: C:voce-0.9.1lib, C:Program * FilesJavajdk1.7.0_45lib

ALSO: I didn't get what i suppose to do with C:voce-0.9.1lib everything there * is winrars

Tried to compile a sample file and it gives me the error:

Testing.obj : error LNK2001: unresolved external symbol _imp_JNI_CreateJavaVM@12

View 14 Replies View Related

Visual C++ :: Hash Table - How To Setup Static Variable

Apr 22, 2014

I am having trouble getting the cout statements that I commented out to work properly. And I can't figure out why the first movie in the movies.txt file displays at the end of the list in my output screen when it should only display once as the first item. I am also having trouble figuring out where and how to set up the static variable.

Purpose : This assignment requires that you to develop a program using the classes listed above. Specifically you will build a hash table containing movie data. The collision strategy will be to build linked lists as the array elements.

Program Specifications : Your program will read the data from the file named Movies.txt located in the StudentFiles1.zip file on the Connections Portal. Each record contains 2 fields separated by a space. They are:

FieldsData Type
Motion Picture Association Code (MPAC)Integer
Movie NameString

Your application program will read each record, create a Movie structure instance and place that structure instance into the hash table.

You will need to modify the appropriate code to provide for an audit trail of the hash table construction. To accomplish this, you will use cout statements in the above class member functions. You will need to modify them to include couts, but the modifications will be relatively small. If not, you are doing it wrong. The hashing algorithm to use is:

Index = int ( 0.618033 * MPAC) % size

Make the array size a constant and set it to 10.

Include a counter for the number of collisions that occurred in building the hash table. Including a static variable in the LinkedList or List class is the best method for doing that.

See the sample audit trail below for the first 5 records on Movies.txt and the size of the hash table set to 3. This is shown for illustration only. The full file will have different locations calculated.

1101-Casablanca is being added
The hashed location is 2
There was no collision loading 1101-Casablanca
------------------------------------------------
1200-Duck Soup is being added
The hashed location is 0
There was no collision loading 1200-Duck Soup
------------------------------------------------

[Code] ....

After the above is displayed, prompt the user to enter the MPAC of a movie to locate. Produce an audit trail when locating the requested movie as shown below: Make sure you list all movies that have collided at the hashed location. That may also cause you to modify one of the existing ADTs a little.

Will search for 6601
at the hashed location is 2
There was a collision here with 6601-Wizard of Oz
There was a collision here with 1101-Casablanca
retrieved from hash table: 6601-Wizard of Oz

[Code] ....

View 10 Replies View Related

C++ :: Connecting To SMS Server?

Nov 11, 2013

I'm currently in the middle of designing a program for some project. one part of the program is to send reminding SMS messages to the employees.

I have already subscribed to a SMS provider that has SMS integration - API. But now I'm wondering how will I be able connect to the SMS server and be able to send messages?

View 1 Replies View Related

C++ :: Downloading File From Web Server?

Jul 4, 2014

I cant seem to get it to write out the correct size to the .gif file,the original is 3kb but the new one i write to finishs with 1kb.

Code:
cout << "Connected"<< endl;
std::string sendbuffer = "GET /apache_pb.gif HTTP/1.1
"
"Host: 192.168.1.4
";
// std::string buffer2 = "GET /apache_pb.gif HTTP/1.1
Host: 192.168.1.4

[Code] ......

View 4 Replies View Related

C++ :: Connecting Client And Server App

May 30, 2013

I need to create a client and server program. The client will have a GUI that will display all the available servers (since more than one will be running) in a list box.

I’m guessing a TCP connection will be the best method here, but how will the client find the servers to connect to? I won’t know the IP address of the server because anyone could take the server program and run it on their computer and the client would have to find it.

Is there some way to make the server send some kind of signal that only the client application will be to connect to? So the server will be sending out a signal, the client finds the signal and connects to the server. Is this possible?

i also need to be able to store the IP address the client selects so when the client application is run again it will automatically connect to the server that was stored.

View 19 Replies View Related

C++ :: Access To SQL Server Without ODBC

Feb 21, 2013

I need to connect and manipulate a DB in SQL Server 2008, but need to have high performance too, so, I want to develop an class in C++ that connect direct to DBMS, in a low level, without using ADO, ODBC or OLEDB.

I found this API [URL] .... which proposes to do exactly what I want, but I need to develop it by myself.

View 4 Replies View Related

C++ :: Multithreaded Server And Client

Apr 28, 2014

I need the code for multithreaded server and client code. one server and two or more client connect to server.

Without fork(),semaphore(),etc

View 1 Replies View Related

C++ :: Can Be Used For Server Side Programming

Nov 28, 2013

I know this question must have been asked before, but the problem that I am facing is that I am using a library PoDoFo to parse PDF files. It seems that it is only compatible with C++.

Now I want the application to be web-based. That is, the user uploads a PDF file on the server, the server parses it and the parsed content is then sent back to the user.

Is such a thing possible with C++, or maybe any good work-arounds? Or should I look at server-side scripting languages like PHP and their respective libraries?

View 8 Replies View Related

C++ :: Web Server Malloc Memory Error

Dec 1, 2014

I am writing a very basic database in C++ and I am accessing the data from a web browser. I am using the opensource Mongoose web server code....

I have an issue...

The way the DB works is this: on starting, the DB loads a json file of all of the data into it. I have a class called DatabaseLoader that does this - it is the class that gets rewritten depending on the data structure of the json.

This is passed to vectors (vector<Node*> and vector<Edge*>) as references from Graph object.

Once the DatabaseLoader has finished it can be destroyed and any memory allocated objects it created (except the ones in those two vectors).

From then on, the Graph object is in charge of all of the elements in the database that are stored in the two vectors. When the user browses to htpp://127.0.0.1:8000 they see the json representing each object in the vectors.

All good so far....

However, when I repeatedly hit refresh in my browser (and call me insane...) at quite a fast speed I get this error:

Code:
main(29855,0x7fff76763310) malloc: *** error for object 0x7f98b2829408: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
[1] 29855 abort ./main testing.json

It seems to me this would be if I tried to "delete" and object twice, or if one of my objects was overwriting memory somewhere. However I am not recreating anything, I am just looping over the vectors and printing out the content. When I refresh slowly, I dont see this happen - i did it quite a lot of times, but when I do it fast I think it is happening.

So is there any possibility of me hitting the c++ web server to quickly and it is trying to process the data twice, causing some sort of memory error - i.e do I need to implement threading or something??

I can paste code, but there is quite a lot now....

View 1 Replies View Related

C# :: Upload A File To Remote Server

Oct 1, 2012

I managed to upload a file to a remote server with below code:

Code:
// Get the object used to communicate with the server.
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://kasunl.worlditsme.com/voo.txt");
request.Method = WebRequestMethods.Ftp.UploadFile;

[Code]....

View 6 Replies View Related

C :: Encryption Of Data To Be Sent From Mobile To Server

Mar 8, 2013

I just started to work on a project which is 'Body Area Network'.

What I need to do is to take data from body with some sensor nodes and send it to mobile which would further send the data to a remote server, and I need to add some security (encryption/decryption) on the data.

So I want to know how to send data from mobile after encrypting it to the server and then decrypt it back(on server side).

View 6 Replies View Related

C :: Connecting To SMS Server And Send Messages

Nov 11, 2013

I'm currently in the middle of designing a program for some project. one part of the program is to send reminding SMS messages to the employees.

I have already subscribed to a SMS provider and they gave me an access to a control panel (aspx). But now I'm wondering how will I be able connect to the SMS server and be able to send messages?

View 11 Replies View Related

C :: Client Not Receiving Time From Server

Sep 2, 2013

I'm building a client server which is communicating.I am trying to use the function recvfrom, but have several bugs, so I might have the recvfrom function in the wrong part of my code.

Code:

int talk_with_server(int fd) {
printf("Test.
");
char buf[LEN];
int n = read(fd, buf, LEN);

[Code]....

View 1 Replies View Related

C :: Server-client File Transfer Using UDP

Sep 1, 2013

I have to make a server-client file transfer using UDP . I have created a basic server which receives message sent by client . That's all. Now comes the major part :-

1. The message sent by client is the name of file
.2. Now the server checks whether there exists this file or not .
3. If there exists it sends the file to the client and it also keeps the count of the number of requests of file made by the client . Here is the Server Code

Code:

#include<sys/socket.h>
#include<arpa/inet.h>
#include<stdio.h>
#include<unistd.h>
#include<fcntl.h>
#include<sys/types.h>
#include<string.h>
}

[code]...

The server reads the data from file and writes into it and send to the client , On the other end client receive the data and make duplicate of this file and write into it. But on compiling it gives error in reading the file.

View 4 Replies View Related

C++ :: Create And Amend Database Using SQL Server?

Nov 1, 2014

I'm trying to find a way to create and amend a database using the SQL server. How to do this. I just know it's included with the VS Express package.

View 1 Replies View Related

C++ :: Retrieve Data / Files From A Server?

Feb 25, 2013

I was wondering if i had to say simply retrieve data from a server whether it be simple plain text for variables or download whole files (FTP), what would be the best method for this? I would imagine there is a pretty big difference between retrieving text and downloading files but im just wondering what the best thing would be to research for both.

View 3 Replies View Related

C/C++ :: Send Message From Server To All Client?

May 30, 2014

First of all i create single server single client program and then using thread i make multiple client to connect to server.

while(true){
csock = (int*)malloc(sizeof(int));
if(nClient<=maxClient){
if((*csock = accept( hsock, (SOCKADDR*)&sadr, &addr_size))!= INVALID_SOCKET ){

[Code].....

The clients send message to the server and server echo back the message to that particular client. But i want that the server will echo back ones's message to all clients. Suppose 5 clients are connected to the server. So whenever one client send a message to the server, the server will send that message to all 5 clients.

View 1 Replies View Related

C# :: Stream Video From LAN Server Onto Client PC?

Oct 9, 2014

I have loads of movies on DVD and they are all on my media server, but the media server doesn't actually allow streaming to be done, the movies are just stored in a folder on the desktop.

My goal would be able to host all my movies on my LAN server, then build an application to run on a windows based PC at home, not over the Internet just over LAN. For example, say the server I have at home had all the movies in a folder on the desktop, then when I start the client on another PC or laptop in my house, I could view all the movies, choose which one and then stream it to that client PC. I am using C#.NET WPF visual studio.

Maybe I could use something like VLC player to play the movies but I would want to build an client application to view the movies and search for them on the server where the movies are stored. Also I know there are other media streaming programs out there but I want to develop my own one for my uses.

View 8 Replies View Related

C/C++ :: Server Receives Corrupted Data

Feb 27, 2014

I have a problem with this work. It is that when the server send some data to the client it send them correctly but when they arrive to the client all the info are changed and i don't know why, because i print them before the send and they are right, but after they arrive to the client the data doesn't be the same.

here it is the server and client's code. In the code there are some italian words, but there are only constant, so there is a real problem to understand the code.

Server

#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdbool.h>
#define FLUSH while(getchar()!='

[code]....

the problem is in the line 136 of the server and on the line 203 of the client

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved