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

Database

 
AnswerRe: auto generation of primary keys Pin
Chris Buckett28-Sep-06 23:30
Chris Buckett28-Sep-06 23:30 
QuestionWHich is more optimal?? Pin
happyheartcs27-Sep-06 23:40
happyheartcs27-Sep-06 23:40 
Questionpb connecting to remote sql server Pin
rama charan27-Sep-06 21:04
rama charan27-Sep-06 21:04 
AnswerRe: pb connecting to remote sql server Pin
Rob Graham28-Sep-06 4:57
Rob Graham28-Sep-06 4:57 
GeneralRe: pb connecting to remote sql server Pin
rama charan3-Oct-06 19:29
rama charan3-Oct-06 19:29 
QuestionBuinding in DataGridView Pin
nesaraja27-Sep-06 19:08
nesaraja27-Sep-06 19:08 
AnswerRe: Buinding in DataGridView Pin
just3ala227-Sep-06 22:39
just3ala227-Sep-06 22:39 
Questiondatabse problem Pin
With_problem27-Sep-06 18:55
With_problem27-Sep-06 18:55 
I am trying to add data in databse by useing this code but i dont know wnow why it is not craeting MyTable it is creating Database.mdb but table is not cretaing why? is the code is incorrect or you can help me to correct my code?I have not done here the ODBC connection
<br />
CDaoDatabase database;<br />
	  CDaoRecordset recordset(&database);<br />
	   CString lpszFile = "c:\\Database.mdb";<br />
	  database.Create(lpszFile);<br />
	  database.Open(lpszFile);<br />
	 CString SqlCmd = "CREATE TABLE MYTable (MarketNo VARCHAR(2),MarketName VARCHAR(8),Bid VARCHAR(10),Ask VARCHAR(10),MarketState VARCHAR(2))";<br />
	  database.Execute(SqlCmd);<br />
      recordset.Open(AFX_DAO_USE_DEFAULT_TYPE,"SELECT * FROM MyTable",0);<br />
	  database.Execute("INSERT INTO MyTable(MarketNo)");<br />
      database.Execute("INSERT INTO MyTable(MarketName)");<br />
	  database.Execute("INSERT INTO MyTable(Bid)");<br />
	  database.Execute("INSERT INTO MyTable(Ask)");<br />
	  database.Execute("INSERT INTO MyTable(MarketState)");<br />
	  recordset.AddNew();<br />
	  recordset.SetFieldValue("MarketNo","a");<br />
      recordset.SetFieldValue("MarketName",Market);<br />
      recordset.SetFieldValue("Bid","b");<br />
	  recordset.SetFieldValue("Ask","c");<br />
	  recordset.SetFieldValue("MarketState","d");<br />
     // recordset.Update();<br />
      recordset.MoveNext();<br />
      recordset.AddNew();<br />

QuestionGrouping events that fall within x days of other events? Pin
T-Smooth27-Sep-06 16:34
T-Smooth27-Sep-06 16:34 
QuestionHow to Select the last N records based on date? Pin
shapper27-Sep-06 15:42
shapper27-Sep-06 15:42 
AnswerRe: How to Select the last N records based on date? Pin
nguyenvhn27-Sep-06 16:00
nguyenvhn27-Sep-06 16:00 
GeneralRe: How to Select the last N records based on date? Pin
shapper27-Sep-06 16:52
shapper27-Sep-06 16:52 
GeneralRe: How to Select the last N records based on date? Pin
nguyenvhn28-Sep-06 0:23
nguyenvhn28-Sep-06 0:23 
QuestionSQL Server Reporting Services ReportViewer Pin
catmom27-Sep-06 11:46
catmom27-Sep-06 11:46 
Questiongetting information based on DateTime Pin
ONeil Tomlinson27-Sep-06 10:39
ONeil Tomlinson27-Sep-06 10:39 
AnswerRe: getting information based on DateTime Pin
nguyenvhn27-Sep-06 16:05
nguyenvhn27-Sep-06 16:05 
QuestionUpdate DB from DataGridView Pin
anderslundsgard27-Sep-06 10:22
anderslundsgard27-Sep-06 10:22 
QuestionRestore "AdventureWorks" database Pin
VK-Cadec27-Sep-06 9:53
VK-Cadec27-Sep-06 9:53 
AnswerRe: Restore "AdventureWorks" database Pin
Chris Buckett28-Sep-06 23:35
Chris Buckett28-Sep-06 23:35 
QuestionExecuting a Stored Procedure thru VS2005 Pin
Brendan Vogt27-Sep-06 4:25
Brendan Vogt27-Sep-06 4:25 
AnswerRe: Executing a Stored Procedure thru VS2005 Pin
nguyenvhn27-Sep-06 16:09
nguyenvhn27-Sep-06 16:09 
QuestionError: Attempt to open a table failed - there were no columns to retrieve were specified. Pin
AbbyDabby27-Sep-06 4:19
AbbyDabby27-Sep-06 4:19 
AnswerRe: Error: Attempt to open a table failed - there were no columns to retrieve were specified. Pin
Kschuler27-Sep-06 8:34
Kschuler27-Sep-06 8:34 
QuestionComplex SQL View Pin
Dayekh27-Sep-06 1:45
Dayekh27-Sep-06 1:45 
AnswerRe: Complex SQL View Pin
albCode27-Sep-06 2:18
albCode27-Sep-06 2:18 

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.