Click here to Skip to main content
15,910,877 members
Home / Discussions / Database
   

Database

 
AnswerRe: ado.net Table Pin
Colin Angus Mackay1-Aug-06 23:02
Colin Angus Mackay1-Aug-06 23:02 
Questiondatabase question Pin
skyeddie1-Aug-06 20:26
skyeddie1-Aug-06 20:26 
AnswerRe: database question Pin
Colin Angus Mackay1-Aug-06 23:04
Colin Angus Mackay1-Aug-06 23:04 
QuestionAdding Row to Access database table Pin
dsovino1-Aug-06 6:44
dsovino1-Aug-06 6:44 
AnswerRe: Adding Row to Access database table Pin
Stephen McGuire2-Aug-06 11:11
Stephen McGuire2-Aug-06 11:11 
GeneralRe: Adding Row to Access database table Pin
dsovino3-Aug-06 12:41
dsovino3-Aug-06 12:41 
GeneralRe: Adding Row to Access database table Pin
Stephen McGuire3-Aug-06 14:23
Stephen McGuire3-Aug-06 14:23 
QuestionRe: Adding Row to Access database table Pin
dsovino7-Aug-06 6:16
dsovino7-Aug-06 6:16 
yep, that made it work (the connection)

I still have an error when i use an INSERT on the query.

Just to make sure, i used the OleDbDataReader to make sure i was able to read the database and the connection was working. Everything ok with this:

{
OleDbConnection conexion = new OleDbConnection(source);
OleDbCommand comando = new OleDbCommand();

string auxsql = "SELECT Id, archivo, [ruta archivo], formato, tamaño, muestreo, bitrate, canales,
duracionSeg, [tipo de audio] FROM archivo";

comando =new OleDbCommand(auxsql,conexion);
conexion.Open();

OleDbDataReader reader = comando.ExecuteReader();
while (reader.Read())
{ txtSQL.Text += (reader.GetInt32(0) + ", " + reader.GetString(1)); }

reader.Close();
}

Now, when i use the code down below, i get an OledbException, "No value given for one or more required parameters."

the CommandText is:

INSERT INTO archivo (archivo, [ruta archivo], formato, tamaño, muestreo, bitrate, canales, duracionSeg, [tipo de audio]) VALUES (07-sublime-badfish-chupa.mp3, path , desconocido,4438226, 44100, 187, 2, 184839, Musica)

so i don't get where the error might be at.

{
OleDbConnection conexion = new OleDbConnection(source);
OleDbCommand comando = new OleDbCommand();

string auxsql = "INSERT INTO archivo (archivo, [ruta archivo], formato, tamaño, muestreo, bitrate,
canales, duracionSeg, [tipo de audio]) ";

auxsql += "VALUES (" + Archivo + ", " + "path "+ ", desconocido," + tamano.ToString() + ", " +
muestreo + ", " + auxbitrate + ", " + canales + ", " + duracionms + ", " + cbTipoAudio.Text + ")";

comando =new OleDbCommand(auxsql,conexion);
conexion.Open();

comando.ExecuteNonQuery();

conexion.Close();

}


once again thanks for the help!



daniel
AnswerRe: Adding Row to Access database table Pin
Stephen McGuire8-Aug-06 2:43
Stephen McGuire8-Aug-06 2:43 
JokeRe: Adding Row to Access database table Pin
dsovino8-Aug-06 4:01
dsovino8-Aug-06 4:01 
GeneralRe: Adding Row to Access database table Pin
Stephen McGuire8-Aug-06 7:19
Stephen McGuire8-Aug-06 7:19 
QuestionSychronization in C# Pin
Rabbit171-Aug-06 5:22
Rabbit171-Aug-06 5:22 
AnswerRe: Sychronization in C# Pin
Ennis Ray Lynch, Jr.1-Aug-06 10:39
Ennis Ray Lynch, Jr.1-Aug-06 10:39 
GeneralRe: Sychronization in C# Pin
Rabbit171-Aug-06 12:49
Rabbit171-Aug-06 12:49 
Generalnope Pin
Ennis Ray Lynch, Jr.1-Aug-06 18:27
Ennis Ray Lynch, Jr.1-Aug-06 18:27 
QuestionProblems updating a dataset Pin
newbjohny1-Aug-06 4:16
newbjohny1-Aug-06 4:16 
AnswerRe: Problems updating a dataset Pin
Paul Brower3-Aug-06 10:50
Paul Brower3-Aug-06 10:50 
GeneralRe: Problems updating a dataset Pin
newbjohny4-Aug-06 0:33
newbjohny4-Aug-06 0:33 
QuestionHow to restore records from table which is dropped. Pin
Abhishek Joshi1-Aug-06 2:58
Abhishek Joshi1-Aug-06 2:58 
AnswerRe: How to restore records from table which is dropped. Pin
ToddHileHoffer1-Aug-06 3:05
ToddHileHoffer1-Aug-06 3:05 
QuestionHow to retrieve records from a ADODB with c# Pin
VanEtienne1-Aug-06 2:57
VanEtienne1-Aug-06 2:57 
AnswerRe: creating special relations between datatables Pin
ToddHileHoffer1-Aug-06 2:52
ToddHileHoffer1-Aug-06 2:52 
GeneralRe: creating special relations between datatables Pin
yiwpyos17-Aug-06 23:45
yiwpyos17-Aug-06 23:45 
QuestionFirewall problem Pin
johan31311-Aug-06 1:54
johan31311-Aug-06 1:54 
QuestionAccessing 2 databases [modified] Pin
mcgann1-Aug-06 1:01
mcgann1-Aug-06 1:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.