ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kavitha <kavithamr...@gmail.com>
Subject Re: Load data to cache
Date Fri, 24 Mar 2017 11:00:16 GMT
Hi,

I set cache name as 'Person' in Ignite ODBC driver.

<http://apache-ignite-users.70518.x6.nabble.com/file/n11420/Capture.png> 
How Can I load data in it?
I tried following code to load data. But no tables exist, while connecting
database through odbc connection. Please explain me how to create database ?
class Program 
    { 
        static void Main(string[] args) 
        { 
            IIgnite ignite = Ignition.Start(@"F:Visual Studio
2015\Projects\CreateCluster\CreateCluster\my-file.xml"); 
            var cache = ignite.GetOrCreateCache<int, string>("Person");
            cache.Put(1, "John");
            cache.Put(2, "Smith");
            cache.Get(1);
            cache.Get(2);
        }
    }

my-file.xml:
<?xml version="1.0" encoding="UTF-8"?> 

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
  <property name="odbcConfiguration">
    <bean class="org.apache.ignite.configuration.OdbcConfiguration"/>
  </property>  
 </bean>
 </beans>



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Load-data-to-cache-tp11394p11420.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message