Hi Alls,
I'm really need your's help...
I develop console application as a engine to pull data from oracle to SQL...the connection to both database is ok..but when to insert got problem....somebody help me plz....
'Connection To Sql
Dim sqlcn As SqlConnection
Dim sqldr As SqlDataReader
Dim sqlda As SqlDataAdapter
Dim sqlcmd As SqlCommand
sqlcn = New SqlConnection("server=localhost;uid=sa;pwd=admin;database=SMARTKIOSK")
'Connection to Firebird
Dim fcmd As OdbcCommand
Dim fcn As OdbcConnection
Dim fdr As OdbcDataReader
Dim fda As OdbcDataAdapter
fcn = New OdbcConnection("DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;DBNAME=172.19.100.4:c:\ibss\database\ibss.gdb;")
Try
sqlcn.Open()
Console.WriteLine("OK")
fcn.Open()
Console.WriteLine("OK")
fcmd = New OdbcCommand("select * from cardholder order by cardholderid ", fcn)
fcn.Open()
fdr = fcmd.ExecuteReader()
Do
While fdr.Read
Console.WriteLine(fdr(2))
sqlcmd = New SqlCommand("INSERT INTO smartkiosk.dbo.cardholder(cardholderid,name) values ('cardholderid','name')", sqlcn)
sqlcn.Open()
sqlcmd.ExecuteNonQuery()
sqlcn.Close()
End While
Loop While fdr.NextResult()
Console.Read()