Connecting database in C#

Tuesday, 26 January 2016 · 6 messages · last reply 11 Feb 2016
BS
Bhander, Gurbakhash S.26 Jan 2016 16:24 #
Hi, I'm Raj working for the U.S. EPA. I'm building an interface on the basex database. I would like to connect the database with one of my grid and charts. How can I connect this database with Grid Components using C#. Do you have any example? Thank you - Raj ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dr. Gurbakhash S. Bhander, Env. Eng. Air Pollution Technology Branch, E305-01, National Risk Management Research Laboratory, U.S. Environmental Protection Agency, 109 T.W. Alexander Drive, Research Triangle Park, NC 27711 Phone: 919-541-7542 Cell: 919-710-1947 Fax: 919-541-0554 bhander.gurbakhash at epa.gov<mailto:bhander.gurbakhash at epa.gov> :) "Start every day off with a smile and get it over with" :) W. C. Fields
CG
Christian Grün26 Jan 2016 16:31 #
Hi, Did you already have a look at our light-weight C# binding [1]? Best, Christian [1] http://docs.basex.org/wiki/Clients
Quoted text · Gurbakhash S. · 37 lines
On Tue, Jan 26, 2016 at 4:24 PM, Bhander, Gurbakhash S. <Bhander.Gurbakhash at epa.gov> wrote: > Hi, > > > > I’m Raj working for the U.S. EPA. I’m building an interface on the basex > database. I would like to connect the database with one of my grid and > charts. How can I connect this database with Grid Components using C#. Do > you have any example? > > > > Thank you - Raj > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Dr. Gurbakhash S. Bhander, Env. Eng. > Air Pollution Technology Branch, E305-01, > National Risk Management Research Laboratory, > U.S. Environmental Protection Agency, > 109 T.W. Alexander Drive, > Research Triangle Park, NC 27711 > Phone: 919-541-7542 > Cell: 919-710-1947 > Fax: 919-541-0554 > bhander.gurbakhash at epa.gov > > > > J “Start every day off with a smile and get it over with” J > > W. C. Fields > > > >
CG
Christian Grün26 Jan 2016 16:41 #
Hi Raj (cc to the list),
Quoted text · Christian Grün · 5 lines
> Yes, I did. I have created a Session class (provided online) but unable to connect it to the existing database. > // create session > Session session = new Session("localhost", 1984, "admin", "admin"); > > It doesn't find the localhost on my machine. I guess, I am missing something. Do I need to install SQL server first?
BaseX is the database, so there’s no need for SQL server. Did you start a BaseX server instance? Our documentation might give you more insight, see the "Getting Started" Section.
BS
Bhander, Gurbakhash S.26 Jan 2016 16:45 #
I guess, I am missing to start the BaseX server instance. Raj
Quoted text · Christian Grün · 13 lines
-----Original Message----- From: Christian Grün [mailto:christian.gruen at gmail.com] Sent: Tuesday, January 26, 2016 10:41 AM To: Bhander, Gurbakhash S. <Bhander.Gurbakhash at epa.gov>; BaseX <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] Connecting database in C# Hi Raj (cc to the list), > Yes, I did. I have created a Session class (provided online) but unable to connect it to the existing database. > // create session > Session session = new Session("localhost", 1984, "admin", > "admin"); > > It doesn't find the localhost on my machine. I guess, I am missing something. Do I need to install SQL server first? BaseX is the database, so there’s no need for SQL server. Did you start a BaseX server instance? Our documentation might give you more insight, see the "Getting Started" Section.
BS
Bhander, Gurbakhash S.in reply to Christian Grün, 26 Jan 2016, 16:4111 Feb 2016 17:23 #
Hi, How can I open existing data in c# and add document in? here are the codes to create a new // create database session.Create("database", ms);?? // Open database Session.Excute????
Quoted text · Christian Grün · 13 lines
-----Original Message----- From: Christian Grün [mailto:christian.gruen at gmail.com] Sent: Tuesday, January 26, 2016 10:41 AM To: Bhander, Gurbakhash S. <Bhander.Gurbakhash at epa.gov>; BaseX <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] Connecting database in C# Hi Raj (cc to the list), > Yes, I did. I have created a Session class (provided online) but unable to connect it to the existing database. > // create session > Session session = new Session("localhost", 1984, "admin", > "admin"); > > It doesn't find the localhost on my machine. I guess, I am missing something. Do I need to install SQL server first? BaseX is the database, so there’s no need for SQL server. Did you start a BaseX server instance? Our documentation might give you more insight, see the "Getting Started" Section.
CG
Christian Grün11 Feb 2016 17:25 #
Quoted text · Bhander, Gurbakhash S. · 1 line
> Hi, How can I open existing data in c# and add document in?
1. Use XQuery to open existing data 2. Use session.add to add resources Hope this helps; if you need more information, please help us as well by giving more hints. here are the codes to create a new
Quoted text · Bhander, Gurbakhash S. · 23 lines
> // create database > session.Create("database", ms);?? > > // Open database > Session.Excute???? > > > -----Original Message----- > From: Christian Grün [mailto:christian.gruen at gmail.com] > Sent: Tuesday, January 26, 2016 10:41 AM > To: Bhander, Gurbakhash S. <Bhander.Gurbakhash at epa.gov>; BaseX <basex-talk at mailman.uni-konstanz.de> > Subject: Re: [basex-talk] Connecting database in C# > > Hi Raj (cc to the list), > >> Yes, I did. I have created a Session class (provided online) but unable to connect it to the existing database. >> // create session >> Session session = new Session("localhost", 1984, "admin", >> "admin"); >> >> It doesn't find the localhost on my machine. I guess, I am missing something. Do I need to install SQL server first? > > BaseX is the database, so there’s no need for SQL server. Did you start a BaseX server instance? Our documentation might give you more insight, see the "Getting Started" Section.

⚡Generated with XQuery