Click here to Skip to main content
15,905,566 members
Home / Discussions / Database
   

Database

 
GeneralRe: A Question About Architecture Pin
Mycroft Holmes22-Jan-10 20:37
professionalMycroft Holmes22-Jan-10 20:37 
GeneralRe: A Question About Architecture Pin
Roger Wright22-Jan-10 21:00
professionalRoger Wright22-Jan-10 21:00 
QuestionSQL Server Agent not displayed in Object Explorer in SQL Server 2005 Express Edition Pin
tannghia21-Jan-10 16:13
tannghia21-Jan-10 16:13 
AnswerRe: SQL Server Agent not displayed in Object Explorer in SQL Server 2005 Express Edition Pin
Eddy Vluggen22-Jan-10 0:11
professionalEddy Vluggen22-Jan-10 0:11 
Questionout parameters workaround for Ms Access [solved] [modified] Pin
Dan Mos21-Jan-10 10:28
Dan Mos21-Jan-10 10:28 
AnswerRe: out parameters workaround for Ms Access Pin
Mycroft Holmes21-Jan-10 12:05
professionalMycroft Holmes21-Jan-10 12:05 
GeneralRe: out parameters workaround for Ms Access Pin
Dan Mos22-Jan-10 3:13
Dan Mos22-Jan-10 3:13 
AnswerRe: out parameters workaround for Ms Access Pin
Pranay Rana21-Jan-10 17:51
professionalPranay Rana21-Jan-10 17:51 
check below code

Dim cnDatabase As ADODB.Connection
Dim rsNewAutoIncrement As ADODB.Recordset
Dim strConn As String
Dim strSQL As String
Dim strPathToMDB As String

strPathToMDB = "C:\NewJet4.MDB"
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strPathToMDB & ";"
Set cnDatabase = New ADODB.Connection
cnDatabase.Open strConn

strSQL = "CREATE TABLE AutoIncrementTest " & _
"(ID int identity, Description varchar(40), " & _
"CONSTRAINT AutoIncrementTest_PrimaryKey PRIMARY KEY (ID))"
cnDatabase.Execute strSQL, , adCmdText + adExecuteNoRecords

strSQL = "INSERT INTO AutoIncrementTest " & _
"(Description) VALUES ('AutoIncrement Test')"
cnDatabase.Execute strSQL, , adCmdText + adExecuteNoRecords

strSQL = "SELECT @@Identity"
Set rsNewAutoIncrement = New ADODB.Recordset
rsNewAutoIncrement.Open strSQL, cnDatabase, adOpenForwardOnly, _
adLockReadOnly, adCmdText
MsgBox "New Auto-increment value is: " & rsNewAutoIncrement(0).Value

rsNewAutoIncrement.Close
Set rsNewAutoIncrement = Nothing
strSQL = "DROP TABLE AutoIncrementTest"
cnDatabase.Execute strSQL, , adCmdText + adExecuteNoRecords
cnDatabase.Close
Set cnDatabase = Nothing


or go to followin link

http://support.microsoft.com/kb/232144/EN-US/[^]

for more info will provide info that you want
GeneralRe: out parameters workaround for Ms Access Pin
Dan Mos22-Jan-10 3:09
Dan Mos22-Jan-10 3:09 
QuestionComposite primary key Table Insertion Problem in SQL Pin
vishnukamath20-Jan-10 22:37
vishnukamath20-Jan-10 22:37 
AnswerRe: Composite primary key Table Insertion Problem in SQL Pin
Bassam Saoud22-Jan-10 5:03
Bassam Saoud22-Jan-10 5:03 
Questionselecting first 7 days from database Pin
benjamin yap20-Jan-10 18:02
benjamin yap20-Jan-10 18:02 
AnswerRe: selecting first 7 days from database Pin
Luc Pattyn20-Jan-10 18:12
sitebuilderLuc Pattyn20-Jan-10 18:12 
AnswerRe: selecting first 7 days from database Pin
Mycroft Holmes20-Jan-10 18:32
professionalMycroft Holmes20-Jan-10 18:32 
GeneralRe: selecting first 7 days from database Pin
David Skelly20-Jan-10 22:49
David Skelly20-Jan-10 22:49 
GeneralRe: selecting first 7 days from database Pin
Mycroft Holmes20-Jan-10 23:27
professionalMycroft Holmes20-Jan-10 23:27 
GeneralRe: selecting first 7 days from database Pin
David Skelly21-Jan-10 1:48
David Skelly21-Jan-10 1:48 
GeneralRe: selecting first 7 days from database Pin
Mycroft Holmes21-Jan-10 11:58
professionalMycroft Holmes21-Jan-10 11:58 
AnswerRe: selecting first 7 days from database Pin
David Skelly20-Jan-10 22:44
David Skelly20-Jan-10 22:44 
QuestionDatabase Schema to represent directory structure Pin
Fadi Yoosuf20-Jan-10 6:52
Fadi Yoosuf20-Jan-10 6:52 
AnswerRe: Database Schema to represent directory structure Pin
Bassam Saoud20-Jan-10 8:34
Bassam Saoud20-Jan-10 8:34 
AnswerRe: Database Schema to represent directory structure Pin
Mycroft Holmes20-Jan-10 18:36
professionalMycroft Holmes20-Jan-10 18:36 
QuestionOracle Boolean in a datatable with c# Pin
camau20-Jan-10 5:54
camau20-Jan-10 5:54 
AnswerRe: Oracle Boolean in a datatable with c# Pin
Jörgen Andersson20-Jan-10 11:12
professionalJörgen Andersson20-Jan-10 11:12 
QuestionOracle Installation Setting Pin
svs_shyam_2720-Jan-10 4:15
svs_shyam_2720-Jan-10 4:15 

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.