• You are not logged in.

#1 Sept. 17, 2013 01:58:34

eagle_79
Registered: 2013-09-17
Posts: 10
Reputation: +  0  -
Profile   Send e-mail  

input from dbase sql server

You can insert dynamic inputs using dbase sql server

Offline

#2 Sept. 17, 2013 07:25:43

admin
Registered: 2012-03-15
Posts: 289
Reputation: +  1  -
Profile   Send e-mail  

input from dbase sql server

No, it can't, FMiner just can input data from the tables of itself, so you must import data to FMiner's tables to use them.

Offline

#3 Sept. 18, 2013 06:22:54

eagle_79
Registered: 2013-09-17
Posts: 10
Reputation: +  0  -
Profile   Send e-mail  

input from dbase sql server

admin
No, it can't, FMiner just can input data from the tables of itself, so you must import data to FMiner's tables to use them.

and if i use code python with varible global for fill ??

Offline

#4 Sept. 18, 2013 07:19:41

admin
Registered: 2012-03-15
Posts: 289
Reputation: +  1  -
Profile   Send e-mail  

input from dbase sql server

eagle_79
Yes, you can write python code in a “runcode” action to do this.

Offline

#5 Sept. 18, 2013 07:41:18

eagle_79
Registered: 2013-09-17
Posts: 10
Reputation: +  0  -
Profile   Send e-mail  

input from dbase sql server

admin
eagle_79
Yes, you can write python code in a “runcode” action to do this.

i write a code

import pyodbc

conn = pyodbc.connect ('DRIVER={SQL Server};SERVER=127.0.0.1\MSSQL01;DATABASE=FMiner;UID=FMiner;PWD=FMiner')
cur = conn.cursor()

cur.execute('''SELECT top 1 * FROM FMiner WHERE (Stato = ‘Da Evadere’);''')

## ritorna la descrizione dei campi del database
#for d in cur.description:
# print (d, end=“ ”)
#print ('')


# ritorna il risutlato della query
#for row in cur.fetchall():
# for field in row:
# print (field, end=“ ”)
# print ('')

#for row in conn.execute (“SELECT top 1 id as id , parola as parola , stato as Stato FROM FMiner”):
# print (row)




row = cur.fetchone()
while row:
print (row, row, row)
row = cur.fetchone()


cur.close()
conn.close()


but not i know set variable global and to set into a fminer to use variable global

Offline

#6 Sept. 18, 2013 09:00:22

admin
Registered: 2012-03-15
Posts: 289
Reputation: +  1  -
Profile   Send e-mail  

input from dbase sql server

“variables” is a dict value, and it's the place to put global variables. See the example here: http://www.fminer.com/run-code/

The example of counter:
if not variables.has_key("counter1"):
variables["counter1"] = 0
else:
variables["counter1"] += 1
if variables["counter1"] >= 10:
result = False
You can see it how to read and write “counter1” from and to variables global.

Offline

#7 Sept. 18, 2013 09:07:15

eagle_79
Registered: 2013-09-17
Posts: 10
Reputation: +  0  -
Profile   Send e-mail  

input from dbase sql server

admin
“variables” is a dict value, and it's the place to put global variables. See the example here: http://www.fminer.com/run-code/

The example of counter:
if not variables.has_key("counter1"):
variables["counter1"] = 0
else:
variables["counter1"] += 1
if variables["counter1"] >= 10:
result = False
You can see it how to read and write “counter1” from and to variables global.

if i copy this cose in runcode and i set the not i see in tab variable and the log

Begin run to the selected node… - (2013-09-18 16:03:06.142000)…
Execution begin run… - (2013-09-18 16:07:02.600000)…
Begin run start with www.google.it.. - (2013-09-18 16:07:02.629000)..
Warn: can't find variables ! - (2013-09-18 16:07:05.932000)
Done a loop of extraction - (2013-09-18 16:07:08.116000)
Execution done (Data saved: Add 0, update 0, ignore 0. Pages: 1). - (2013-09-18 16:07:08.145000).

in attachment the example flow

Attachments:
attachment test.png (20.9 KB)

Offline

#8 Sept. 18, 2013 09:22:43

admin
Registered: 2012-03-15
Posts: 289
Reputation: +  1  -
Profile   Send e-mail  

input from dbase sql server

The program will start with “goto”, you can see a “starting” on the “goto” action.
You can make a goto with “about:blank” as URL as the starting.

Offline

#9 Sept. 18, 2013 10:03:27

eagle_79
Registered: 2013-09-17
Posts: 10
Reputation: +  0  -
Profile   Send e-mail  

input from dbase sql server

admin
The program will start with “goto”, you can see a “starting” on the “goto” action.
You can make a goto with “about:blank” as URL as the starting.

with your help, now the demo works. but my job does not export variables python row, can you help

Offline

Board footer

Moderator control

Powered by DjangoBB