Autor Beitrag
dtakis
Hält's aus hier
Beiträge: 14

Windows XP SP 2
Delphi 6, VS 2005 C# Develop
BeitragVerfasst: Mi 09.11.05 15:06 
Hallo!

ich habe ein Programm gemacht und ein SQL query:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
<ol type="1"><li>qSQL.Close;
    qSQL.Params.Clear;
    qSQL.SQL.Clear;

    qSQL.SQL.Add('SELECT Name, Surname, DateOfBirth, Address, Phone1, Phone2 FROM Player WHERE August="False" ');

qSQL.Open;//Alles Gut bis hier</li></ol>


Ich versuche:

ausblenden Delphi-Quelltext
1:
DBGridSubscriptions.DataSource.DataSet := qSQL; // Hier, gibt es Problem!					


um meinem DBGrid auszufullen aber nehme ich:

---------------------------
MyProject
---------------------------
Access violation at address 00480465 in module 'MyProject.exe'. Read of address 00000030.
---------------------------
OK
---------------------------

Wie kann mann das DBGrid ausfullen?

Danke!

_________________
Yet Another PAPEI Programmer
Robert.Wachtel
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 895
Erhaltene Danke: 7

Windows 7 Ultimate x64
D5 Ent, D7 Arch, RAD Studio 2010 Pro, VS 2008
BeitragVerfasst: Mi 09.11.05 16:37 
Existiert die DataSource?
noidic
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 851

Win 2000 Win XP Vista
D7 Ent, SharpDevelop 2.2
BeitragVerfasst: Mi 09.11.05 16:41 
hast du dem Grid ein TDataSource-Objekt an die Eigenschaft Datasource zugewiesen?

_________________
Bravery calls my name in the sound of the wind in the night...
stifflersmom
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 194

XP /XP PRO/ SuSE div.
D1 - D7, BDS 2006
BeitragVerfasst: Mi 09.11.05 16:45 
Mal eine Frage:
Ist es Absicht, die Verknüpfung des DBGRIDS mit Deiner Datasource zur Laufzeit und nicht in der IDE zu erstellen?

Wenn ja, welchen Sinn hat es?


Moin
dtakis Threadstarter
Hält's aus hier
Beiträge: 14

Windows XP SP 2
Delphi 6, VS 2005 C# Develop
BeitragVerfasst: Do 10.11.05 16:37 
user profile iconRobert.Wachtel hat folgendes geschrieben:
Existiert die DataSource?

Was meinen Sie? Ich versuche die DataSource im Lauf Zeit kreiern! Ich glaube dass mein Syntax falsch ist!
dtakis Threadstarter
Hält's aus hier
Beiträge: 14

Windows XP SP 2
Delphi 6, VS 2005 C# Develop
BeitragVerfasst: Do 10.11.05 16:43 
user profile iconnoidic hat folgendes geschrieben:
hast du dem Grid ein TDataSource-Objekt an die Eigenschaft Datasource zugewiesen?

Nein!

Ich habe ein TDataSource-Objekt zugewiesen, um Dateien zu sehen und es war funktionbar!
dtakis Threadstarter
Hält's aus hier
Beiträge: 14

Windows XP SP 2
Delphi 6, VS 2005 C# Develop
BeitragVerfasst: Do 10.11.05 16:46 
user profile iconstifflersmom hat folgendes geschrieben:
Mal eine Frage:
Ist es Absicht, die Verknüpfung des DBGRIDS mit Deiner Datasource zur Laufzeit und nicht in der IDE zu erstellen?

Wenn ja, welchen Sinn hat es?


Moin


Richtig! Ich will einen ganz leeren TDBGrid im Laufzeit mit Dateien ausfullen!

Ich habe ein paar TComboBoxes eine Suche zu machen und denn ein TDBGrid auszufullen!

Ist es klar?
dtakis Threadstarter
Hält's aus hier
Beiträge: 14

Windows XP SP 2
Delphi 6, VS 2005 C# Develop
BeitragVerfasst: Do 10.11.05 18:55 
Ich habe eine Losung!

Ich habe meine Code geandert!


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
<ol type="1"><li>//SQL query
qSQL.Open;
      MessageBox(fmMain.Handle,'qSQL.Open','Ok!',mb_Ok);
     
    DBGridSubscriptions.DataSource := dsSearch; </li></ol>


Was ist neu:
dsSearch ist eine Datasource die mit qSQL Table verbindet ist!

Ich versuche mein Program...alle in Ordnung!
stifflersmom
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 194

XP /XP PRO/ SuSE div.
D1 - D7, BDS 2006
BeitragVerfasst: Fr 11.11.05 13:47 
Tut mir leid,
aber ich habe ehrlich gesagt nichts verstanden.
Aber wenn Du Dein Problem gelöst hast,
ist ja alles wunderbar.


Moin