I have the following problem:
I'm trying to create an application to insert data into lotus notes nsf bases by an application of C #. So far I have this:
private void button2_Click(object sender, EventArgs e)
{
bool isServerData = radioButton1.Checked;
// Set up connection string
string connString = ("Driver=Lotus NotesSQL Driver (*.nsf);" + ("Server=" + textBox1.Text + ";" + "Database=C:\\Archivos de programa\\Lotus\\notes\\data\\clientes\\… + "UserName = 192.168.*.*" +";" + "Password= "+ textBox2.Text + "" ));
string CmdString = "SELECT * FROM Contactos";
OdbcConnection Conn = null;
OdbcDataReader Reader = null;
OdbcDataAdapter adaptador = new OdbcDataAdapter();
DataTable contactos;
string con = connString;
//string sel = ("INSERT INTO Contactos (_126, _21, _19, _20) VALUES(?, ?, ?, ?) ");
string sel = "INSERT INTO Contactos (_126, _21, _19, _20) VALUES('Luisa', 'noexiste@nohay.com', '55555555', 'programador')";
try
{
// Open Connection
/***************************************…
Conn = new OdbcConnection(connString);
Conn.Open();
}
Make the following error:
System.Data.Odbc.OdbcException was detected
Message="ERROR [HY000] [Lotus][ODBC Lotus Notes]No INSERT/UPDATE/ALTER/CREATE INDEX/CREATE VIEW on view"
Source="NSQLV32.DLL"
ErrorCode=-2146232009
StackTrace:
en System.Data.Odbc.OdbcConnection.HandleEr… hrHandle, RetCode retcode)
en System.Data.Odbc.OdbcCommand.ExecuteRead… behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
en System.Data.Odbc.OdbcCommand.ExecuteRead… behavior, String method, Boolean needReader)
en System.Data.Odbc.OdbcCommand.ExecuteNonQ…
en LOTUS.Form1.button2_Click(Object sender, EventArgs e) en D:\Respaldos\Ejemplos Devexpress y c#\LOTUS\LOTUS\Form1.cs:línea 82
InnerException:
Thank you very much and sorry for the inconvenience.
Thank you very much, with your help I knew it was just a view, but as it had something to manage the content of the nsf databases did not know where he was going to add so I guess.
Bookmarks