C# :: How To Parse Information Into A Connection String For EF (Oracle Db)

Aug 25, 2014

So when I create the EF and use generate model from the database, I included the sensitive info into the connection string. Now I want to get the user to input password, userID, schema name, host into the connection string. I use Oracle as my database, so there is a need to put the schema name in it also.... How do I accomplish this task? Been trying to get it work but unsuccessful so far...

View 3 Replies


ADVERTISEMENT

C++ :: Parse A Text File That Contains Information

Jul 31, 2014

I am trying to parse a text file that contains information and i cant seem to get started. For example, the text file looks like this:

idx=929392, pl= 12, name= someperson
age=19
state=ma
status=n/a

idx=929393, pl= 12, name= someperson2
age=20
state=ma
status=n/a

idx=929394, pl= 12, name= someperson3
age=21
state=ma
status=n/a

I want to parse the name and age into another text file like this format:

someperson 19
someperson 20
someperson 21

possibly include other attributes next to the age like idx?

View 3 Replies View Related

C# :: Connection String With Relative Path

Jun 3, 2014

I have my application database in the AppDataRoaming folder. I'm trying to create a connection string for Telerik reporting, up until now I've had a connection string in a settings class that is put together like this:

The path is:

data source=C:UsersSynlightAppDataRoamingAppNamedataAppDB.sqlite

I've tried files paths like this:

%AppData%RoamingAppDatadataAppDB.sqlite

and

Server.MapPath(@"~App_DataRoamingAppDatadataAppDB.sqlite

(those are not the real directory names, of course). How do I create a connection string that will work on target machines?

View 5 Replies View Related

C# :: Null Reference With Connection String

Nov 29, 2014

private DataSet1 GetData(string query) {
string conString = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;

The above is erring out with NullReferenceException

View 6 Replies View Related

C Sharp :: SQL Server Connection String To Connect Through Domain Name (internet)

Sep 20, 2012

I have tried to connect my sql server 2005 using a domain name. i have bought a domain name and a dns client. this is my connection string

{ SqlConnection sqlconn = 
 new SqlConnection("user id=user1;" + "password=pass2;"
  + "server=www.mysite.infoServerInstance;" 
+ "trusted_Connection=false;" + "network 
library=DBMSSOCN;" + "Integrated security=false;" 
+ "initial catalog=Mydatabase;" +"connection timeout=5
;"); }

I have added sql browser & sql server in fire wall, and also enabled tcp port 1433 and udp port 1434. the above connection string works perfect when i run it in the server machine, but whenIi try to run it on other machines I am getting an error that server is not available or cannot find the specified server.. I desperately need to access my database through an url. ie., through internet..

View 6 Replies View Related

C++ :: Parse A String Containing Number And Characters From File

Feb 20, 2015

I have a text file which contains many sentences. I am trying to extract only the numerical values from the string that conatins characters,numbers and white spaces from the file. I want to seperate the characters and numbers into different parts.

for example: the file contains sentances as given below.

I have to go to school for 10min.
You will come here in 15min.
He stayed here for 20min.

from the above sentances, I want to seperate " I have to go to school for " and "10" and put them into two different variables and also 10 should be in integer format.

View 1 Replies View Related

C++ :: String Stream Usage To Parse The Line

Oct 7, 2012

I am working on a project were I have to read line form ( PLC ) programmable logic controller generated text file with lines like this

Circuit Value Current 2.33 4.32 5.55
there could be up to 3000 lines per txt file

I am using string stream to parse the line, for the sake of good programming I which to check weather first three values are string and last three values are actually floats raise or throw an exception if they are not ....

View 4 Replies View Related

C/C++ :: How To Connect With Oracle Database

Sep 24, 2012

library management system in which c is used as front end and oracle is used as back end in order to retrieve the data. if possible can u send the source code for it.

View 1 Replies View Related

C++ :: Storing Information In String Without User Input?

Oct 9, 2014

Is it possible to store information in a string without user input? If so, what code would I use for it?

View 2 Replies View Related

C++ :: Oracle Library Runtime Error

Jan 14, 2014

I downloaded Oracle instantclient-basic-nt-12.1.0.1.0.zip and instantclient-sdk-nt-12.1.0.1.0.zip and extracted both to c:oracle I then went into visual studio 2013 and created a Win32 Console application with all default parms.

I then went into project -> properties -> C/C++ -> General -> Additional Include Directories and added my include path C:oraclesdkinclude

I then went into project -> properties -> Linker -> General -> Additional Library Directories and added C:oraclesdklibmsvcvc11

I then went into project -> properties -> Linker -> Input -> Additional Dependancies and added oraocci12.lib

The program compiles but when I debug i get a RUNTIME error that says "The program can't start because oraocci12.dll is missing from your computer. Try reinstalling the program to fix this problem. But I know the file exists in C:oraclesdklibmsvcvc11oraocci12.lib

This is the code if it makes a difference

Code:
#include "stdafx.h"
#include <iostream>
#include <occi.h>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])

[Code].....

View 8 Replies View Related

Visual C++ :: Saving CMap Into Oracle SQL?

Sep 24, 2012

I have MFC class that contains a CMap with 160K~ entries. CMap(long,long,long,long).

I need to save this CMap in oracle SQL.

How do you recommend to save it ?

View 1 Replies View Related

C Sharp :: How To Save Excel File Into Oracle Table

Apr 5, 2013

I need to save excel file data directely into oracle database by using XML string but getting error as

ORA-01704: string literal too long
01704. 00000 - "string literal too long"
*Cause: The string literal is longer than 4000 characters.
*Action: Use a string literal of at most 4000 characters.
Longer values may only be entered using bind variables.
Error at Line: 50 Column: 31

View 9 Replies View Related

C :: Accept Information Of 5 Students And Display Information Of First 3 Students - Unable To Get Output

Aug 15, 2013

Code to accept the information of 5 students and display the information of first 3 students......

Code:
#include<stdio.h>
main() {
struct stud {
char name[20];
int rollno;
float per;
char grade;

[Code] ....

View 6 Replies View Related

C# :: How To Disable And Enable LAN Connection In WPF

Jun 22, 2014

i have tried to search on the Internet but haven't found a suitable result that links in with what I want to do, that is to creation a WPF application and when you press a enable button it will enable the LAN and when I click the disable button it will disable the LAN until i click the enable button again. Now I know how to creation a WPF and the buttons, but how would I do the disabling LAN and enabling LAN?

By LAN i mean just the networking adapters, so that the PC cannot connect to a router and then the Internet.

View 14 Replies View Related

C :: Getting Input From A Serial Connection (Hyperterminal)

Mar 15, 2013

Wondering why I cannot communicate with my microcontroller dspic33 with the Hyperterminal program. In the sample test code, I also cannot use printf. They have it set up differently and I am wondering if it is possible to redirect the output of the printf, scanf functions to the port I am using?

View 3 Replies View Related

C# :: Reconnecting To Internet If Connection Drops

Jan 24, 2014

I am currently writing a small windos form app which relies on an internat connection.

The only issue I have is trying to find out how to force the app to reconnect if the internet drops out without the app crashing. From what I have read I could use "try and catch" but I am not sure how to do this.

The code I have so far is: for testing I am using [URL] as the web site target.

Form1.Designer:

namespace Browser2014
{
partial class Form1
{

[Code]....

View 3 Replies View Related

C Sharp :: Could Not Open Connection To SQL Server

Feb 19, 2013

I'm getting this error.

SQLite error
near "16": syntax error

On the code:

private void btnUpdate_Click(object sender, EventArgs e)
{
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{

[Code]....

With breapoints etc it does show the values it has to insert into my database. But it just doesn't and gives me the Near "16" syntax error.

View 50 Replies View Related

C++ :: How To Give Database Connection To Code

Apr 11, 2013

how to give a database connection to a c++ code i am using turbo c++ as an editor and if i have oracle 11g client, odbc as a driver , what else i require and how to link these things in a code.

View 1 Replies View Related

C++ :: HTTP POST Request - Connection Failure

Apr 22, 2014

I have issues with this i am new to winsock. so i was learning to use winsock for http POST request

Compiles correctly, but doesnt connect i get the error "Connection Failure" what do you think can be wrong

My code goes like this:

Code: #define WIN32_LEAN_AND_MEAN
#include "stdafx.h"
#include <cstdio>
#include <cstdlib>
#include <Winsock2.h>

[Code] .....

View 1 Replies View Related

C++ :: Command Line And Waiting For A Connection (Socket)

Feb 7, 2014

I am designing a server program in C++ and now that everything works for the clients, I would like to implement a command line. The code waits for a connection with the predefined function "new_socket = accept(serversocket,(struct sockaddr *)&client,&addrsize);". I already made a function for the command line but I can't find a way (in my brain or on the web) to accept commands (getline) whilst no connection is accepted yet. (I mean wait for a connection. If no connection, then be ready to receive some arguments from the command line). Here is part of the code:

cout << "Waiting for connection/command...";
command_line_function(); //getline(cin,string)
while(true){
new_socket = accept(serversocket,(struct sockaddr *)&client,&addrsize);
if(new_socket == INVALID_SOCKET){ //INVALID_SOCKET is an error somehow.
error_function();}
cout << "ACCEPTED
";
//etc.
}

View 5 Replies View Related

C# :: MySQL Exception Connection Unexpectedly Terminated

Jul 10, 2014

I am currently developing a sync module using asp.net. I am getting data from an external database (mysql database) The problem is I am getting the error "Connection unexpectedly terminated" when filling the dataset.

Here's my code

string P_contact = "SELECT A.id, B.firstname, B.middlename, B.lastname FROM Accounts A, Contacts B WHERE A.id = B.id";
MySqlDataAdapter db_P_contact = new MySqlDataAdapter(P_contact, conn);
DataSet ds3 = new DataSet();
DataTable dt3 = new DataTable();

[Code] ....

I am getting the exception on this line of code:

db_P_contact.Fill(ds3, "P_contact");

View 3 Replies View Related

C# :: Access Database Connection And Saving Data

Mar 17, 2014

I want to connect an access database (.mdb) to my Windows Forms application - this I can do and I have no problems viewing my table in server explorer.

Some code example or template that I can use as a base to learn from - I have literally trawled Google and Youtube and cannot find what I am after.

What I want to do is have a basic form, 2 text boxes and a button to save the data to my database.

FirstName and LastName are the 2 boxes.

View 6 Replies View Related

C# :: Concurrent Sharp Panel Connection With Semaphores And Buffers

Apr 26, 2014

I have a problem with my C#. Trying to create the airstrip with planes heading out of the hangars and on to the road to the airstrip. Each Hangar pannel is connected with closes road to them. What i am stuck with right now is connecting the roads together so each one of them will see if the next road is free and if it is it will send the plane (colorder square for now) to it and then proceed to the next one when finaly they will line up for the final panel(airstrip) and take off.So far they are just going down the each road they are assigned with semaphore and thread.

using System;
using System.Windows.Forms;
using System.Threading;
using System.ComponentModel;
using System.Collections;
using System.Data;
using System.Drawing;

[Code] ....

Connecting the "p2" with "p5" so the graphics from "p1" the square will travel through P2 and P5 this would be great and will allow me to procede with my studies.

Also i do realise that this might not be the best ways of using concurrent Csharp and not the up to date one but this is what i have been assigned with and do not have any other options unfortunately.

How i understand this is that i need to have 3 buffers and 3 semaphores for each panel. But i do not know how to add those to each one of them and then connect it with the next one as if i try and add them it either puts a cross in the design view over that panel or says that there is limited options for this statement.

This is the way that i want to do it unfortunately it must be so. The most flexible this can be is by adding an array for semaphores and buffer ( do not know how to do that either).

View 7 Replies View Related

C Sharp :: Winform Installer Error From Database Connection

Aug 20, 2013

I was created winform application with sql data base, after i created it i was converted to the installer file,for the other users but when they run the application did not connect to the database, how i fix this stuff...?

View 1 Replies View Related

C++ :: Windows Socket Makes App Crash If No Internet Connection

Oct 18, 2014

I'm strugling to understand why my app is crashing if there is no internet connection.

Code:
int main() {
WSADATA wsaData;
if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) {
std::cout << "WSAStartup failed.

[Code] ....

Debug crash code:

Code:
First-chance exception at 0x00161831 in ConsoleApplication1.exe: 0xC0000005: Access violation reading location 0x0000000C.
Unhandled exception at 0x00161831 in ConsoleApplication1.exe: 0xC0000005: Access violation reading location 0x0000000C.

It works well as long as the computer is connected to internet but if i disconect from internet the application crash but don't understand why.

View 4 Replies View Related

C# :: Make Connection Between Access 2013 And Visual Studio 2010?

Mar 27, 2014

I want make connection between access 2013 and visual studio 2010(c#) but the error below is displaying

View 7 Replies View Related







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