Finally, I managed to get the answer
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strConnect
strSQL = "INSERT INTO table1 (Table1Text) VALUES ('" & i & "')"
objConn.Execute strSQL
strSQL = "SELECT @@Identity"
Set...
Hi,
I am created a table with auto incremented field as a primary key in Ms Access table. I am using ASP to insert a record into the table. I wonder how can I get back the auto incremented field from ADO. My code is showed as below:
Set cnn =...
Dear All,
Can I use the Eclispe editor to program a J2EE project like EJB? As I know the Webpshere Application Developer is also based on the Eclispe platform. I have used Webpshere Application Developer, the new project option include a J2EE project when we want to create a new project? But, I...
Dear All,
I want to store some name-value pair data inside a list object in ASP. So that, I can set and get value-pair data from the list using name instead of using array. Is there any built object in ASP that can do that? In Java, we can use the hash table. Or, we can use the associate...
Hi All,
I have a problem open a static recordset in ASP. I wonder static recordset is working in ASP or not? By default, what type of recordset is default in ASP?
My code sample is showes as below:
Set cnn = Server.CreateObject("ADODB.Connection")
cnn.Open CONSTR
Set rst =...
Dear johnwm,
I dont think there is a menu item knownas "mnuFileOpen" in the Internet Explorer. Infect, I have used Web Control & SHDocVw.InternetExplorer to control an instance of Internet Explorer, these OCX control and automation object dont provide such interface.
Thank you...
Dear All,
How to use Web Control & SHDocVw.InternetExplorer in vb to disable and enable certain menu items in the Internet Explorer menu. More over, how to enable or disable certain item on the menu bar. Currently, I can make the menu, menu bar, address bar to be visible or invisible but I...
Dear All,
I have wrote a class and I want to pass in parameters in the class_initialize() like below:
Private Sub Class_Initialize(ByVal Name As String)
strUser = Name
End Sub
When I compile it to dll, visual basic prompt error.
Can we actually pass in parameters into class_initialize?
Thank...
Dear All,
This is a sample code to get primary key using ADO without calling specific function from a particular DBMS.
dim rstSchema as ADODB.Recordset
dim cnn as ADODB.Connection
.
.
''Get the primary key from all tables
Set rstSchema = cnn.OpenSchema(adSchemaPrimaryKeys)
If Not rstSchema.EOF...
Dear All,
I have some data store in database in binary format.
How I retrieve this data from database and handle it?
I can get other data from database and store it into xml file using ADO and MsXML. But I have no idea of how to store the binary data to XML file if even I...
Dear sjravee,
Your suggestion is correct but should return variant also. Example like below:
Public Function GetRecordset( _
ByVal Connect As Variant, _
ByVal SQLQuery As Variant, _
Recordset As Variant) as variant
This is because...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.